Jump to content

Calculation Help Needed

Recommended Posts

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?

Link to comment
Share on other sites

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!!!



 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 */


Link to comment
Share on other sites

  • 1 year later...

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:



Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...