Jump to content
  • 0

Need Assistance with a Field Update


jayandang

Question

I have a dropdown field in a webform named "Order Type". When the value 'full' is selected from my "Order Type" dropdown field, I need another field named "Amount Due" to be populated with the value '$25' when the form is submitted.

I have the following code (which isn't working properly). I appreciate any help!

function getDeps()

{

var deps = document.getElementById("InsertRecordOrderType").value;

if (deps == “Fullâ€)

{

document.getElementById("InsertRecordAmountDue").value="$25";

}

document.getElementById("caspioform").onsubmit=getDeps();

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Hello,

You could try something like the following:

function getDeps()

{

var myList = document.getElementById("InsertRecordOrderType");

var deps = myList.options[myList.selectedIndex].text;

if (deps.match(“Fullâ€))

{

document.getElementById("InsertRecordAmountDue").value="25";

}

}

document.getElementById("caspioform").onsubmit=getDeps;

Hope this helps! Thanks,

SO

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.

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

Loading...
×
×
  • Create New...