braxwell Posted October 20, 2016 Report Share Posted October 20, 2016 Hello Caspio Nation, I have a submission form - the form has 2 fields that are populated by a cascading dropdown and contain a price. Id like to put a total field on the submission form so i need a simplethe html code to add these two fields together. The cascading dropdown seems to be the issue - can anyone please help? Quote Link to comment Share on other sites More sharing options...
braxwell Posted October 20, 2016 Author Report Share Posted October 20, 2016 This is the code i have in place - it works great as long as the input fields are text fields - when they become cascading dropdowns it no longer works. Please help!!! <SCRIPT LANGUAGE="JavaScript"> function calculate() { var v_field1 = parseFloat(document.getElementById("InsertRecordOD_PD").value); if (isNaN(v_field1)) v_field1 = 0; var v_field2 = parseFloat(document.getElementById("InsertRecordOS_PD").value); if (isNaN(v_field2)) v_field2 = 0; var v_field3 = parseFloat(document.getElementById("InsertRecordOD_SEG").value); if (isNaN(v_field3)) v_field3 = 0; var v_total = (v_field1 + v_field2+v_field3); document.getElementById("InsertRecordTOTAL_SALE").value = (v_total); } /* On submitting the webform, the function calculate is executed */ document.getElementById("caspioform").onchange=calculate; </SCRIPT> Quote Link to comment Share on other sites More sharing options...
Kurumi Posted September 14, 2018 Report Share Posted September 14, 2018 Hi @braxwell, As of July 12, 2018, Caspio introduced new features which you can find here: https://howto.caspio.com/release-notes/caspio-bridge-13-0/ This release includes a new feature , Calculated Values in Submission Forms. This allows you to generate calculations which you can use as your total field. Check these videos for more information: Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.