Forum Post: RE: How to make fields appear dynamically in my view page

Status
Not open for further replies.
S

Santosh Patel

Guest
There is a common solution if all the fields you need to hide or show are encompassed by a section. Meaning you would show or hide entire sections based on your checkbox value. This can be achieved using 2 inbuilt functions as follows (add the script to a script tag in page body or as an onload action - your choice) : script var updateSections = function() { var id = rbf_getSectionIdByTitle('Conditional Section Title'); rbf_showOrHideSection(id, $('#mycheckboxselector').prop('checked')); } $('#mycheckboxselector').change(updateSections); /script However, if you need to hide or show individual fields which may or may not be in the same section, following jquery snippets could help you. Depending on the layout of your page, the field maybe in a table row of it's own or be a cell in a row along with other fields. - If the field is in a row of it's own (where 'name' is the integration name of the field) $('#rbi_F_name').parent().hide(); - If the field is in a row with other fields (multi-column layout) $('#rbi_F_name').hide(); $('#rbi_L_name').hide(); Note: With individual fields you need to ensure show/hiding both the field and it's label. Rollbase field label has id as rbi_L_ integration_name_of_field while actual field has id as rbi_F_ integration_name_of_field

Continue reading...
 
Status
Not open for further replies.
Top