Show case of how to use the plugin jquery to conditionally hide or display some fields in a form
To be continued.... In the mean time, see this:
YAML
preferences:
feature_trackers: y
feature_user_watches: y
instructions: Profile_Conditional_Display_in_Forms_instructions_page
objects:
-
type: tracker
ref: cdf
data:
name: Conditional Display in Forms
description: Some fields will be shown/hidden based in selections in previous fields
default_status: open
list_default_status: opc
restrict_end: 0
section_format: flat
restrict_start: 0
show: [ status, creation_date, modification_date, list_modification_date ]
allow: [ comments, attachments ]
-
type: tracker_field
ref: cdf_summary
data:
name: Summary
tracker: $Conditional_Display_in_Forms:cdf
type: text_field
flags: [ searchable, public, list, mandatory, link ]
order: 10
Sample data
YAML
objects:
-
type: tracker_item
ref: item_001
data:
tracker: $Conditional_Display_in_Forms:cdf
status: open
values:
- [ $Conditional_Display_in_Forms:cdf_summary, Sample issue 1 ]
-
type: tracker_item
ref: item_002
data:
tracker: $Conditional_Display_in_Forms:cdf
status: pending
values:
- [ $Conditional_Display_in_Forms:cdf_summary, Sample issue 2 ]
Modules
YAML
objects:
-
type: module
ref: module_last_modif_tracker_items
data:
name: last_modif_tracker_items
groups: [ Anonymous, Registered ]
position: right
order: 5
params:
trackerId: $cdf
name: Summary
-
type: module
ref: module_last_tracker_comments
data:
name: last_tracker_comments
groups: [ Anonymous, Registered ]
position: right
order: 9
This will include:
Profile_Conditional_Display_in_Forms_instructions_page
YAML
instructions: Conditional_Display_in_Forms_instructions
preferences:
enable: [ feature_wiki ]
objects:
-
type: wiki_page
ref: cdf_page
data:
name: Conditional_Display_in_Forms_instructions
description: How it works
lang: en
content: wikicontent:Profile_Conditional_Display_in_Forms_instructions_page