Jump to content
  • 0

Conditional Second Page


sferraro

Question

Hello:

I am trying to create a two-page form where the second page is displayed only if a checkbox form field is checked.

I placed the code below in the HTML Footer field of the form, but when I enter the form data and click submit, nothing happens. Anybody have a suggestion?

<script type=\"text/javascript\"> 
function getDeps() {
if (document.getElementById(\"EditRecordDependent_Coverage\").checked)
{dependent_search
}
}
document.forms[0].onsubmit=getDeps; 

</script> 

Thanks

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

If the script runs in a webform it should have InsertRecord prefix instead of Edit Record. Try if the following works. Also redirect the browser by replacing the code of ur destination in URL-

function getDeps() {

if (document.getElementById(\"InsertRecordDependent_Coverage\").checked)

{

window.location=\"URL\";}

}

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

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