You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Survey Displaying Dependent Questions

Received Response
12
Views
2
Comments
edited Jun 8, 2022 8:53AM in Agent Desktop 2 comments

Content

Hi,

Requirement is to display different questions based upon the value selected in first question which is a  choice type question(Radio).I am using the below java script code for the same but with no luck.Please help.

Thanks

 

 

 

Version

May 2015

Code Snippet

             <html xmlns="http://www.w3.org/1999/xhtml" xmlns:rn="http://schemas.rightnow.com/crm/document">
  <head><title>Test Survey</title><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head>
 <body><form rn:webform="true">
<rn:question question_id="2438" split="False" version="3" onchange="if(this.value==10259){ShowContent('hiddenA');}else if(this.value==10260){ ShowContent('hiddenB'); }">Test Question</rn:question>
<div id="hiddenA" style="display:none;"><rn:question question_id="2439" split="False" version="3">A</rn:question></div>
<div id="hiddenB" style="display:none;"><rn:question question_id="2440" split="False" version="3">B</rn:question></div>
 <script type="text/javascript" language="JavaScript">
function ShowContent(d)
{
document.getElementById(d).style.display = "block";
}
</script>
</form></body></html> 
        

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!