Difference between revisions of "Form Custom Building Logic"
From All n One's bxp software Wixi
Philip Lacey (talk | contribs) |
Philip Lacey (talk | contribs) |
||
| Line 2: | Line 2: | ||
| − | The primary concept is that items are shown / hidden depending on the onChange options of items selected. [[ | + | The primary concept is that items are shown / hidden depending on the onChange options of items selected. [[JavaScript_in_bxp]] provides an introduction to putting JavaScript into the form. |
| − | The primary JavaScript function for this is : [[JavaScript_Show_/_Hide_elements]] Detail of how this can be used is available in [[ | + | The primary JavaScript function for this is : [[JavaScript_Show_/_Hide_elements]] Detail of how this can be used is available in [[JavaScript_in_bxp#Showing_.2F_Hiding_Questions]] |
Latest revision as of 02:54, 2 January 2016
Within a form in bxp software (bxp) it is possible to add JavaScript to facilitate logic.
The primary concept is that items are shown / hidden depending on the onChange options of items selected. JavaScript_in_bxp provides an introduction to putting JavaScript into the form.
The primary JavaScript function for this is : JavaScript_Show_/_Hide_elements Detail of how this can be used is available in JavaScript_in_bxp#Showing_.2F_Hiding_Questions
The logic can be applied in numerous places including the events of the questions themselves JavaScript_Field_Events. It is recommend though to centralise your logic function for ease of management.
The next set of code which can be useful to know how this area works is JavaScript_-_Detecting_if_a_question_is_visible
It is always worth bearing in mind JavaScript_-_Code_reusability
Alternately it can be useful, instead of showing / hiding numerous drop down lists, you could approach it as JavaScript_-_Modifying_List_Contents_Dynamically
As always if you have any questions on how to approach logic in your script please get in touch with us Understanding_bxp_Support