Jump to content

how to combine values collected from drop down lists

Recommended Posts

Is it possible to combine the results of drop downs? When I use

var x = document.getElementById("EditRecordFieldName1").value;

var y = document.getElementById("EditRecordFieldName2").value;

var bothnames = x + y;

and the input types are set to TEXT, I get the result I want. If I change it to a drop down that references a look-up table then I get no result. Is there a different way to access the value?


Link to comment
Share on other sites

I figured it out...

the original

var x = document.getElementByID("EditRecordName1").value;

the correct format

var x = document.getElementsByName("EditRecordName1")[0].value;

Added an /s/ to element and changed /ID/ to /Name/ and added at the end [0]. Not sure what the [0] actually means, but it works!

Link to comment
Share on other sites

If you are wondering what [0] is for:

The document.getElementsByName will return an array of all dropdowns in the document called for example EditRecordName1 so to refer to the dropdown element you should use [0] which is the index referring to the first dropdown (although there is only one but still you should use [0]).


Bahar M.

Link to comment
Share on other sites

  • 7 years later...

You could try the Calculated Value to get and combine the values of your Dropdown. 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 for your DataPage. 

Check these videos for more information:


I hope this helps!


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