You are viewing limited content. For full access, please sign in.

Question

Question

Assistance with JQuery Syntax

asked on April 10, 2019

Hello Laserfichers! 

I am new to JQuery and was hoping someone could assist with some basic syntax.  I have a drop-down list which has 8 different contract types.  I created 8 Custom HTML code sections that contains a brief description of when the contract should be used.  I have also assigned a CSS class to the drop-down list and each separate Custom HTML code sections.  My goal is to hide all Custom HTML fields initially and show them when the proper drop-down value is selected. 

 

Any assistance would be greatly appreciated.

 

Thanks!

0 0

Answer

SELECTED ANSWER
replied on April 10, 2019

I think it may be easier for you to use the field rules. The custom HTML will show the code, so normally I put an ID attribute in the initial element so that I can tell which is being used. From there it is setting which custom HTML you want to show and what the drop down should be to get it to show. Also, you can combine options by using "when any" in the second line.

Usually you will only need to use jQuery for more complex cases, such as if it is comparing different fields or you need to see if a string is in the field rather than the string is the field. If you do need to use jQuery, you will need to know which question number the drop down is, what the different options are going to be, and the different Customer HTML question number or ID inside the custom HTML.

 

1 0
replied on April 10, 2019

Thanks!  I thought I could use Field Rules, but after I created the first HTML code I didn't see it listed.  And of course it's there now :)

 

Thanks again!

0 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.