WebMaker enables users to hide Fields or Groups using a number of methods depending on the specific requirement. It is possible to hide fields conditionally based on the value of a field, or prevent it being sent to the Browser altogether. Both these options are performed by setting up details on the 'Field Details' tab within FormMaker.
1) 'Conditionally' hide Fields or Groups completely
This option is most appropriate if the requirement means that the user should never see the Fields or Groups at any time. This technique is very useful if Fields or Groups are hidden for security or user role permission reasons. Alternatively, there is a requirement to restrict sending lots of information to the browser as the user will not need to see it. This can help with performance, but does mean if the data does need to be displayed at some point, then there needs to be a a request sent back to the server to enable the rest of the data to be displayed.
The 'Hide Field Based on Runtime Data' tick box within the 'Visibility' section allows you to specify that in certain situations this field should never appear on the screen. This is different to the options below, as in this case the field details will be removed on the server, and will never reach the user's browser. If this option is selected, binding information will be required on the 'Data Bindings' tab to indicate the condition under which the field should be hidden.
2) Hide Fields or Groups 'conditionally' using CSS
This option allows the field to be hidden using the same data binding based condition as above, with the difference being that in this case the information is still sent to the browser, just not visible to the user. Therefore this option is only more practical if there is a chance that the data needs to be shown without refreshing the page. This would require custom script to change the visibility status, so in many cases, the third option below is more suitable.
Within the 'Field Style Details' is a 'Add Conditional Background Styling' link that provides the user with an option to set a style based on matching a condition. The style available in the CSS is 'hide'. This should be typed into the 'Conditional style name is' field. If this option is selected, data binding information will be required on the 'Data Bindings' page to indicate the condition under which the field should be hidden. It will also be necessary to perform the same setup for the 'Add Conditional Label Styling' to ensure both the label and the field are hidden.
3) Hide Group based on 'browser side' decision
This option allows a group of fields to be conditionally suppressed on the browser based on a value selected by a user. This option can be useful when a set of fields should be shown dependant on clicking a link or tick box, or selecting a radio button option e.g. Male/Female, tick if there are dependants, etc.
Within the 'Visibility Details' section for the Group, tick the 'Display Group based on the value of a Field' option. For this option the Field and its Value need to be defined. This condition will be checked dynamically on the 'browser side' as the user enters the data or clicks an option. Please note that this technique relies on javascript being enabled on the browser for the user. The first two options above don't as the decision to hide the fields is performed on the server before the page is sent to the browser.
It is often useful to define 'layout groups' around fields to control such decisions. These types of groups do not render any display characteristics. The groups are intended purely as containers for controlling such display decisions.
NOTE: options for Repeating Data columns is covered in a separate FAQ.
1) 'Conditionally' hide Fields or Groups completely
This option is most appropriate if the requirement means that the user should never see the Fields or Groups at any time. This technique is very useful if Fields or Groups are hidden for security or user role permission reasons. Alternatively, there is a requirement to restrict sending lots of information to the browser as the user will not need to see it. This can help with performance, but does mean if the data does need to be displayed at some point, then there needs to be a a request sent back to the server to enable the rest of the data to be displayed.
The 'Hide Field Based on Runtime Data' tick box within the 'Visibility' section allows you to specify that in certain situations this field should never appear on the screen. This is different to the options below, as in this case the field details will be removed on the server, and will never reach the user's browser. If this option is selected, binding information will be required on the 'Data Bindings' tab to indicate the condition under which the field should be hidden.
2) Hide Fields or Groups 'conditionally' using CSS
This option allows the field to be hidden using the same data binding based condition as above, with the difference being that in this case the information is still sent to the browser, just not visible to the user. Therefore this option is only more practical if there is a chance that the data needs to be shown without refreshing the page. This would require custom script to change the visibility status, so in many cases, the third option below is more suitable.
Within the 'Field Style Details' is a 'Add Conditional Background Styling' link that provides the user with an option to set a style based on matching a condition. The style available in the CSS is 'hide'. This should be typed into the 'Conditional style name is' field. If this option is selected, data binding information will be required on the 'Data Bindings' page to indicate the condition under which the field should be hidden. It will also be necessary to perform the same setup for the 'Add Conditional Label Styling' to ensure both the label and the field are hidden.
3) Hide Group based on 'browser side' decision
This option allows a group of fields to be conditionally suppressed on the browser based on a value selected by a user. This option can be useful when a set of fields should be shown dependant on clicking a link or tick box, or selecting a radio button option e.g. Male/Female, tick if there are dependants, etc.
Within the 'Visibility Details' section for the Group, tick the 'Display Group based on the value of a Field' option. For this option the Field and its Value need to be defined. This condition will be checked dynamically on the 'browser side' as the user enters the data or clicks an option. Please note that this technique relies on javascript being enabled on the browser for the user. The first two options above don't as the decision to hide the fields is performed on the server before the page is sent to the browser.
It is often useful to define 'layout groups' around fields to control such decisions. These types of groups do not render any display characteristics. The groups are intended purely as containers for controlling such display decisions.
NOTE: options for Repeating Data columns is covered in a separate FAQ.