JS Help needed - Small calculation must be done.
Permalink
Hi there,
I'd need some help on a Javascript Calculator Form.
What I need is a form where the user inputs a number:
eg. 3000
then there's fixed value per unit (eg. 0.90) which has to be displayed. So if the user inputs 3000 in the first field, 2700 should be the output.
Then there must be an output what 50% of that 2700 equals to, so 1350 should be displayed somewhere to.
Additionally I need to have an output that shows 1/12th of the 1350, so in this example 225 should be displayed.
The output values should always be rounded, so if theres 1349,71 the script should only show 1350,00
How can I do this or is there anything in the marketplace this can be done with? All those form things I looked into lack the ability to do proper calculations.
Thanks.
I'd need some help on a Javascript Calculator Form.
What I need is a form where the user inputs a number:
eg. 3000
then there's fixed value per unit (eg. 0.90) which has to be displayed. So if the user inputs 3000 in the first field, 2700 should be the output.
Then there must be an output what 50% of that 2700 equals to, so 1350 should be displayed somewhere to.
Additionally I need to have an output that shows 1/12th of the 1350, so in this example 225 should be displayed.
The output values should always be rounded, so if theres 1349,71 the script should only show 1350,00
How can I do this or is there anything in the marketplace this can be done with? All those form things I looked into lack the ability to do proper calculations.
Thanks.
Attached is a zip file that contains an External Form that should do this for you. You should just have to unzip it and put it into your /blocks directory. I did assume that you are using Concrete 5.6.x or below, since there was no mention of 5.7 in your post.
Thank you soooo much :-)