I want to have 6 input fields in a webpage. If the user presses a button the 6 fields expand to 7,8, 9, or 10 fields. The fields are editable and come with a preset value. With the input from the user (or the preset values) a final value is calculated via a formula.
form
for the fields or DIV
s?JavaScript
or something else I am not thinking about yet?AJAX
when getting the values or is it not needed in this case?jQuery
https://github.com/mleibman/SlickGrid/wiki/Examples but it seems overkill for my needs plus I would need to edit a lot of it since I want a simple display of the fields.I would use a form as you're asking the users for their data to be input. This will also trigger the keyboard on mobile/tablet devices if you're also targeting those platforms.
Javascript is fine for this, unless you want to hide the formula you're using (as they will be able to see it if they view your source).
Do you need to use AJAX? Are the pre-populated values going to change that much? If not, then no, it's just adding extra work when you could just have an array of values.