User input to add up field in database

Hi

I am very new to coding and try to figure out the following problem -

How do I get a user input box to add up a field in a database? for example, I am trying to create a form for users to create a match report on soccer. One of the fields in the form is minutes played. Every time the user inputs a number into the field, I want to then have a separate page where there is a table displaying the number of minutes played over the season.

Hi,

You’d be able to display any fields from your database collection on a table without any code.
You can check out the following articles for more information on how to input & display your data:
https://support.wix.com/en/article/creating-a-form-with-user-input-elements
https://support.wix.com/en/article/displaying-database-content-in-a-gallery-or-a-table

If you wanted to input data into your collection with code, you’d need to first get the value of your text input element and insert that value into the relevant database collection and field . And then set those values onto the table.

I’d suggest taking a look at the following API’s:
ValueMixin
insert()
Table

Feel free to post any issues you run into if you try to implement this feature with code. Don’t forget to paste your code and provide a link to your site if so.

Best regards,
Miguel

There are previous forum posts that you can have a read of too like these here.

https://www.wix.com/corvid/forum/community-discussion/adding-two-input-values

https://www.wix.com/corvid/forum/community-discussion/collecting-user-input-on-one-page-trying-to-calculate-fields-based-on-user-input-info-click-on-result-opens-up-new-page-to-display-info

https://www.wix.com/corvid/forum/community-discussion/how-to-calculate-a-custom-price-based-on-user-input

https://www.wix.com/corvid/forum/community-discussion/custom-price-based-on-user-inputs

Also, depending on how you want to display your played minutes results, you can take a look at the Chart.js samples here.
https://www.wix.com/corvid/example/chart.js-custom-element
https://www.wix.com/corvid/example/create-a-custom-chart

As numbers in a table not on a graph