Changes

Jump to: navigation, search

Show/Hide Header

2,850 bytes added, 20:32, 5 November 2008
no edit summary
=Overview=

This is a new feature designed to support more dynamic pages by providing for control of the visibility of [[Custom Fields|custom fields]] through values that are entered elsewhere on the page.

The concept is that one [[Custom Fields|custom field]] - the "control field" - is used to control the display of a set of [[Custom Fields|custom fields]] based on a value entered or selected in the control field.

The control field can be any type of [[Custom Fields|custom field]] that can contain a value such as a text box ([[single|Custom Field Type (30): Text – Single Line]] or [[multiple line|Custom Field Type (40): Text – Multiple Lines]]), [[Combo box - select one|Custom Field Type (10): Select One – Combo Box]], [[Check boxes - select many|Custom Field Type (20): Select Many – Check Boxes]], [[Calculated field|Custom Field Type (60): Special – Calculated Value]] or Lookup type field.

The only field types that cannot be used are fields such as [[browser script|Custom Field Type (103): Special – Browser Script]], [[Image|Custom Field Type (34): Display Only – Image]] field, etc.

The controlled fields must all be placed under a '''Title Bar''' type field.

=Example=

Place the following code in the '''HTML Tag''' box of the Control field:


onchange="_showhideheader(xxxxxx,this.value=='Yes')"

Where '''xxxxxx''' is the field ID of the '''Title Bar''' field that you wish to control.

Where Yes is the value in the control field that you wish to use to trigger the display of '''Title''' '''Bar''' and the other Controlled fields in the block.

More complex syntax can also be used:

onchange="_showhideheader(xxxxxx,this.value!='Yes')" - Display the controlled fields when the control field is not equal to Yes.
onchange="_showhideheader(xxxxxx,(this.value=='Yes' || this.value=='Maybe'))" - Display the controlled fields when the control field is either Yes or Maybe.
onchange="_showhideheader(xxxxxx,this.value==''") - Display the controlled fields when the control field is empty.
onchange="_showhideheader(xxxxxx, parseInt(this.value ) >6)" - Display the controlled fields when the control field is greater than 6.

The difference between this feature and [[Dynamic Control|Custom Field Type (87): Dynamic Data – Dynamic Control Field]] field is that:

Unlike the [[Dynamic|Custom Field Type (87): Dynamic Data – Dynamic Control Field]] [[Custom Field|custom field]], there are no fields "nested" within the control field and the set of fields that you wish to control can be located anywhere on the page.

Using nested [[Dynamic Control|Custom Field Type (87): Dynamic Data – Dynamic Control Field]] fields (dynamic controls within dynamic controls) you cannot report below the first level of nested fields.

[[Category:Custom Fields]][[Category:Enhancements]][[Category:System Management]]
4,401
edits

Navigation menu