Hi, I am just one step away from completing a complex Form Tools project and am in desperate need of some help with code to make the Pre-Parser Module do the one final function required.
The External website form (not Form Builder) accepts numbers of this and numbers of that. There is a Javascript equation running that dynamically calculates the TOTAL CUBIC METRES value from the numbers entered by the visitor.
<script> e.g. : 'total_metres3=(bed_king*2.00)+(bed_queen*1.50)+(bed_single*0.62)+(bed_head*0.30)+(bed_draws*0.14)'
And the 'total_metres3' value gets posted into the Form Tools database just fine ... lovely !
Using the "Submission Accounts" module, clients can log-in to the Form Tools UI later to update the numbers of items ... again, lovely !
However, the total_metres3 figure needs to be re-calculated and updated each time a record is edited inside the Form Tools interface. I was relying upon the "Pre-Parser Module" being able to do that task. However, I have tried, tried and tried entering various versions of code, without any success.
==>> Using the example Java equation above, is anybody able to help me with an example of some Pre-Parser code that will actually do the basic addition and multiplication to successfully re-calculate AND update the "total_metres3" field in the database ?
I am at my wits end and really would appreciate some advice. Running Form Tools Core v2.2.6.
Many thanks,
Gary, I.T.ZAP
The External website form (not Form Builder) accepts numbers of this and numbers of that. There is a Javascript equation running that dynamically calculates the TOTAL CUBIC METRES value from the numbers entered by the visitor.
<script> e.g. : 'total_metres3=(bed_king*2.00)+(bed_queen*1.50)+(bed_single*0.62)+(bed_head*0.30)+(bed_draws*0.14)'
And the 'total_metres3' value gets posted into the Form Tools database just fine ... lovely !
Using the "Submission Accounts" module, clients can log-in to the Form Tools UI later to update the numbers of items ... again, lovely !
However, the total_metres3 figure needs to be re-calculated and updated each time a record is edited inside the Form Tools interface. I was relying upon the "Pre-Parser Module" being able to do that task. However, I have tried, tried and tried entering various versions of code, without any success.
==>> Using the example Java equation above, is anybody able to help me with an example of some Pre-Parser code that will actually do the basic addition and multiplication to successfully re-calculate AND update the "total_metres3" field in the database ?
I am at my wits end and really would appreciate some advice. Running Form Tools Core v2.2.6.
Many thanks,
Gary, I.T.ZAP