Customizing Drop-down Lists

Updated on

Dropdown lists are powerful tools to make sure that you get consistent data from your members and stakeholders, however, you can often encounter situations where a dropdown list that is appropriate for one audience is inappropriate for another.

Example: You have two kinds of applications - professional and student. For a dropdown question "How did you find out about us?" you want to offer different choices:

For student applicants:
- Student Newspaper
- Campus Event
- Web search
- Word of Mouth

For professional applicants:
- Alumni newsletter
- Web search
- Networking event
- Annual Conference
- Word of Mouth

Two of these items are the same (Word of mouth, Web search) while the others are different, however, when you view these in iMIS you want all of these values to be available.

Sonic Forms allows you to use different lookup tables *per form* to provide the right user experience. In this case we would have three lookup tables:


The master "FIND_US" lookup table will encompass all of the codes and descriptions used on both "FIND_US_STUDENT" and "FIND_US_PROF".

Once you have created your lookups just follow these steps to deploy them:

1. Add the field to your form as usual.
2. Switch to the HTML editor and find your field definition. You will see code similar to this:

<select va_val="required." other="True" orderby="descasc" vaatt="Char.40-0" requiredmsg="Required Field">

3. Simply edit the "<option>" tag to change the last value to your selected lookup.

<select va_val="required." other="True" orderby="descasc" vaatt="Char.40-0" requiredmsg="Required Field">

4. Save your form to enable the changes.