Form Section Group
From All n One's bxp software Wixi
Revision as of 17:15, 22 March 2014 by Philip Lacey (talk | contribs)
Section Groups are a divider for a script in the same way a section header is.
A section group however has the ability to group a number of questions for a number of uses, specifically hiding and showing large groups of questions quickly.
Usage:
- Add a "Section Group" to your script, giving it an appropriate title
- Check the script to ensure it is in the right position. (Reorder questions as necessary)
- From the Form - Edit console on the left of the screen click "Answer Values - Modify" (Main Menu > Form Management > Form - Primary > Form - Edit > Choose your form > Modify Answer Values)
- Choose the "Section Group" you just added
- It allows you to enter values as if it was another closed question type. Enter the Ids of the questions to manage with this group, from the list at the bottom of the screen.
- When you have finished adding all you need, retest your script. The Section Group should now have a - image to the far right. Click this should hide the group of questions.
Please note to NOT add the same Id as that of the question.
JavaScript Usage:
The Section Group also creates three custom JavaScript functions on the page. If we create a group and it is in Campaign 1149 and the Section Group is field_0_19. The function names would be:
function fn_SectionGroup_strCDA_1149_field_0_19_Show(strObject) //This will show all the questions in this group, regardless of shown or hidden
function fn_SectionGroup_strCDA_1149_field_0_19_Hide(strObject) //This will hide all the questions in this group, regardless of shown or hidden
function fn_SectionGroup_Toggle_strCDA_1149_field_0_19() //This inspects the image of the group. Using the src of the image, if + (plus) shows, if - (minus) shown, hides.
Data Usage:
The CDA field will not hold any data just like a Section Header.
If the QA module is used for managing records, the contents of a grouped scoring result will be stored in the CDA field for the Section Group.