Difference between revisions of "JavaScript - Title Block Hide Elements"

From All n One's bxp software Wixi

Jump to: navigation, search
(Created page with " == Title Block Hide Elements == Through the user of a custom JavaScript function, BeX users are now able to hide the individual elements of the question type ''Complex - Tit...")
 
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
  
== Title Block Hide Elements ==
+
== Title Block Hiding Elements ==
  
Through the user of a custom JavaScript function, bxp users are now able to hide the individual elements of the question type ''Complex - Title Block''.
+
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''.
  
  
Line 19: Line 19:
 
'''1) strFieldId:''' Replace with the question Identifier i.e. strCDA_X_field_0_X
 
'''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 with''false'' to leave the field visible
+
'''2) blHideTitle:''' Replace with '''''true''''' to hide the field, or replace with '''''false''''' to leave the field visible
  
'''3) blHideFirstName:''' Replace with ''true'' to hide the field, or replace with''false'' to leave the field visible
+
'''3) blHideFirstName:''' Replace with '''''true''''' to hide the field, or replace with '''''false''''' to leave the field visible
  
'''4) blHideInitial:''' Replace with ''true'' to hide the field, or replace with''false'' to leave the field visible
+
'''4) blHideInitial:''' Replace with '''''true''''' to hide the field, or replace with '''''false''''' to leave the field visible
  
'''5) blHideSurname:''' Replace with ''true'' to hide the field, or replace with''false'' to leave the field visible
+
'''5) blHideSurname:''' Replace with '''''true''''' to hide the field, or replace with '''''false''''' to leave the field visible
  
  
Line 46: Line 46:
 
fn_General_ComplexTitleBlock_ShowHide ( 'strCDA_602_field_0_2', false, false, true, false );
 
fn_General_ComplexTitleBlock_ShowHide ( 'strCDA_602_field_0_2', false, false, true, false );
 
</source>
 
</source>
 +
 +
 +
[[Category:Module Specific:Form Management]]
 +
[[Category:Topic:JavaScript]]

Latest revision as of 15:49, 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 with false to leave the field visible

3) blHideFirstName: Replace with true to hide the field, or replace with false to leave the field visible

4) blHideInitial: Replace with true to hide the field, or replace with false to leave the field visible

5) blHideSurname: Replace with true to hide the field, or replace with false 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 );