Jump to content
  • 0

Displaying Value Of Dropdown On Another Part Of The Page. Out Of Ideas!



I am new to Caspio and coding in general, so I am having a hard time!

I have an intake form which is quite long. Each section has a "score" at the bottom of a cascading dropdown list that is determined by how each item above it is answered. It is populated automatically, without the user actually making a selection.

I have put the entire form in an accordion so that each section can be opened separately. I'm trying to display the score of finished sections in their respective headers. Right now, I've just been working on one section to try to get it to work first before worrying about the rest of the form.

Is there a way to do this within Caspio without creating a separate script? Nothing I've written so far has seemed to work. Here is an example:


 function checkScore() {
      var scoreResult= Number(document.getElementById('Income_Score').value);
      document.getElementById('currentScore').innerhtml = scoreResult;
document.getElementbyId('Income_Score').onchange = checkScore;
I've tried many variations on the theme! I suspect the problem is the .onchange somehow, but maybe I'm just way off altogether?
Any suggestions?
Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Hello Beth,


Maybe, the problem is incorrect IDs?

Rules for IDs are described in the article.

For example, on Submission form ID will be like "InsertRecordcurrentScore".


One more thing, it is better to use "value":

document.getElementById('currentScore').value = scoreResult;

instead of

document.getElementById('currentScore').innerhtml = scoreResult;


I hope, it 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.

Answer this question...

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