Difference between revisions of "JavaScript - Title Block Hide Elements"
From All n One's bxp software Wixi
(→Title Block Hide Elements) |
(→Title Block Hiding Elements) |
||
| Line 2: | Line 2: | ||
== Title Block Hiding Elements == | == Title Block Hiding Elements == | ||
| − | Through the | + | Through the use of a custom JavaScript function, bxp users are now able to hide the individual elements of the question type ''Complex - Title Block''. |
Revision as of 08:57, 2 December 2014
Title Block Hiding Elements
Through the use of a custom JavaScript function, bxp users are now able to hide the individual elements of the question type Complex - Title Block.
To use the custom function, simply copy the below line of code into the Form Settings - JavaScript OnLoad - Opening code execution
fn_General_ComplexTitleBlock_ShowHide ( strFieldId, blHideTitle, blHideFirstName, blHideInitial, blHideSurname );
When using the function call above you need to replace the following fields
1) strFieldId: Replace with the question Identifier i.e. strCDA_X_field_0_X
2) blHideTitle: Replace with true to hide the field, or replace withfalse to leave the field visible
3) blHideFirstName: Replace with true to hide the field, or replace withfalse to leave the field visible
4) blHideInitial: Replace with true to hide the field, or replace withfalse to leave the field visible
5) blHideSurname: Replace with true to hide the field, or replace withfalse to leave the field visible
Example 1
// * Hide the Initial field and the Surname field
fn_General_ComplexTitleBlock_ShowHide ( 'strCDA_602_field_0_2', false, false, true, true );Example 2
// * Hide the Title field and the Initial field
fn_General_ComplexTitleBlock_ShowHide ( 'strCDA_602_field_0_2', true, false, true, false );Example 3
// * Hide the initial field
fn_General_ComplexTitleBlock_ShowHide ( 'strCDA_602_field_0_2', false, false, true, false );