iFormBuilder JavaScript Tips & Tricks
What's covered:
You should also know about:
What are Subforms?
Subforms can be used to condense and break up your larger form into smaller sections. They take form elements that would originally be on the Parent form and create Child forms which are linked directly to the Parent.
Click here for more information on Subforms.
How do I hide a completed Subform?
Upon completion of a Subform, you may want to hide the subform element so that it cannot be accessed after it is filled out. To add this functionality, please follow the example below.
PLEASE NOTE: In the example below, the Table Name of the Parent form is hide_a_subform_example.
STEP 1. Add a Subform element to your form. In this example, the data column name of the Subform element is subform_to_hide.
STEP 2. Add a Number element to your form. The data column name in the example is my_number_element.
STEP 3. In the Dynamic Value of the Number element, place the following:
hide_a_subform_example.subform_to_hide.length
PLEASE NOTE: This is giving a number to the length of the data in the subform (to start will be 0).
STEP 4. To hide the Number element, put the word false into the Condition Value field.
STEP 5. In the Condition Value field of the Subform element, add the following:
my_number_element==0
PLEASE NOTE: The length of the subform changes when elements of the subform have been filled out and the user selects done or save. This is saying the element will only display when the length of the subform is 0.
Comments
0 comments
Please sign in to leave a comment.