Hidden field for summed total in form
Permalink
I need to replicate a form where a user inputs values and the form sends the user values as well as a summed total of those values. Each field will have a value attached to it and this value is multiplied by the user's input.
For example:
Item1 = 1
Item2 = 0.25
Item3 = 0.95
So if the user enters
Item1 = 3
Item2 = 1
Item3 = 2
Then the form will calculate the total as
Item1 : 1 x 3 = 3
Item2 : 0.25 x 1 = 0.25
Item3 : 0.95 x 2 = 1.9
TOTAL = 5.15
So the form would send the user input as normal AND the total.
Any suggestions on whether the default form can do this? Maybe hidden fields?
Or whether I need to custom code one and if so then pointers in the right direction would be appreciated.
Dex
For example:
Item1 = 1
Item2 = 0.25
Item3 = 0.95
So if the user enters
Item1 = 3
Item2 = 1
Item3 = 2
Then the form will calculate the total as
Item1 : 1 x 3 = 3
Item2 : 0.25 x 1 = 0.25
Item3 : 0.95 x 2 = 1.9
TOTAL = 5.15
So the form would send the user input as normal AND the total.
Any suggestions on whether the default form can do this? Maybe hidden fields?
Or whether I need to custom code one and if so then pointers in the right direction would be appreciated.
Dex
Hi MrKD,
Thanks for the information. The form will have a lot of items. The original can be seen here:
http://www.1800backloads.com.au/quotes.php...
Dex
Thanks for the information. The form will have a lot of items. The original can be seen here:
http://www.1800backloads.com.au/quotes.php...
Dex
Hi MrKD,
Just wondering if you can give me a pointer as to why I am getting an error with my external form.
When I click submit the form submits to
http://www.zesttas.com.au/clients/tasfurnituretransport/index.php/o...
but it shows a 404 for that url.
Any clues.
Cheers,
Dex
Just wondering if you can give me a pointer as to why I am getting an error with my external form.
When I click submit the form submits to
http://www.zesttas.com.au/clients/tasfurnituretransport/index.php/o...
but it shows a 404 for that url.
Any clues.
Cheers,
Dex
@dexcode
I can't tell much from the link.
Do you want to attach the external form as an attachment so others can look for issues?
I can't tell much from the link.
Do you want to attach the external form as an attachment so others can look for issues?
Hi MrKD
I have attached the form and the controller file. Any suggestions are gladly welcome.
Dex
I have attached the form and the controller file. Any suggestions are gladly welcome.
Dex
To all reading this post, the error seems to be identical to this one:
https://github.com/concrete5/concrete5/issues/2116...
Even if I copy the test_form over and use, the same redirect error occurs.
Does anybody know what causes this and if it was actually fixed or still a bug. I notice that the github bug post has been closed but there does not look to be any resolution to it??
I am currently running version 5.7.5.2.
Dex
https://github.com/concrete5/concrete5/issues/2116...
Even if I copy the test_form over and use, the same redirect error occurs.
Does anybody know what causes this and if it was actually fixed or still a bug. I notice that the github bug post has been closed but there does not look to be any resolution to it??
I am currently running version 5.7.5.2.
Dex
This can be done using the External Form block. It would require custom code.
http://www.concrete5.org/documentation/using-concrete5-7/in-page-ed...
How many items would your form have?