I need to create a simple form which asks two values from the user, and when she submits the form shows a value calculated based on those values.
For example, user could be shown something like this:
1st number:
2nd number:
Result:
Calculate!
The only editable fields are 1st and 2nd number. After giving the numbers and clicking Calculate!, she sees the following page:
1st number: 15
2nd number: 20
Result: 35
Calculate!
She can now modify the numbers and reclick Calculate! It is OK to submit and reload the page, the values don't need to be updated in-place.
Do I have to do this using JavaScript injection, or is there another way?