By default, the survey designer generates a basic entry wizard
based on the results list it is designed to populate. Questions are generated for each data type and given the assigned field name field names. Options for building a more user-friendly survey that is more likely to obtain the information you want can be done in several ways:
Customize Default Survey Questions
For a more traditional and user-friendly survey, you can add more description, write survey questions in a traditional sense, and control which fields are optional.
- Go back to your survey folder.
- Click Edit next to the ConferenceAdvance survey design you created in the previous step. Hover over the row to reveal the (pencil) edit icon.
The main panel contains the JSON code to generate the basic survey. Below the label and description on the right, there is documentation of the configuration options available within the JSON.
- Make changes as follows:
- Change the caption for the First Name field to read "First name to use for nametag".
- Change required field for First Name to true.
- Change the caption for the Reception field to read "Check this box if you plan to attend the reception:".
- Change the caption for the GuestPasses field to read "How many guests will you be bringing (including yourself)?"
- Change the width for the GuestPasses field to 400.
- In the Date field, change the caption to "Preferred Talk Date".
- Change the hidden paramenter for Title to true (perhaps you decided you no longer plan to print titles on nametags).
Now click Create Survey
in the Surveys: ConferenceAdvance
web part. You will see your adjusted questions, which should now better request the information you need. Notice that the field you marked required is shown in bold and with an asterisk. Required fields are also listed in a note below the submit button which will be inactive until all required information is provided.
Customize Survey Parameters
You can make various changes to the overall design and layout using parameters to survey
outlined in the Survey Configuration Options
panel. For example, you can use a card
format and change the Survey Label
the user sees where they are expected to enter the primary key for your results table, in this case a registration number you gave them to use as participant ID.
- Return to your folder and again open the ConferenceAdvance survey design for editing.
- In the JSON panel, change "layout" to "card".
- Add a new parameter: "labelCaption" : "Attendee Registration Number". All parameters must be comma separated.
- Click Save Survey.
- In the Surveys: ConferenceAdvance web part, click Create Survey and note the new format and start tab. The bulk of the survey (that will populate the SurveyResults list) is on the second step of the new card-style wizard.
For a complete outline of the survey
parameters and their defaults, see:
Customize Question Metadata
In addition to the survey question types directly based on field datatypes, there are additional options for more complex questions. For example, for a given text field such as title, you might constrain allowable input by using a lookup from a table of three character abbreviations (Ms., Mr., Mrs, Dr., Hon) to format evenly on nametags. To do so, create a list of allowable options, and add a "Combobox"
question to your survey.
- First create the list of allowable values. For this example, create list called Titles.
- Add a single field called Title of type Text.
- Set the Key Field Name to Title.
- Save the list, and import the following data:
- Click Edit for your ConferenceAdvance survey design.
- Open the Question Metadata Examples panel on the right by clicking the small chevron button in the upper right.
- Click the name of any question type and an example JSON implementation will appear in a scrollable panel below the bar.
- You can cut and paste the JSON from the middle panel in place of one of your default questions. Watch for result type mismatches.
- Customize the parameter values as with default questions. In this title lookup example, specify the appropriate containerPath, queryName, and displayColumn.
- Save the survey and when you run it again, the field will be presented as a dropdown menu listing all the values from the selected list.
- Note that you can have the lookup show only results from a specific custom grid view, such as a filtered subset of the full list, by adding the viewName parameter to the lookup (after queryName).
For a complete list of question datatypes and their parameters, see: