Advanced Tutorial - Dynamic List Generation

This feature has been deprecated. Please use Conditional Display of Responses.

Response lists can be generated dynamically based on previous selections in a questionnaire.

Instructions:

  1. Create your first question and responses. The question can be Single choice, Weighted score, Single list, or Combo box.

  2. Create your second question on a different page. This will be the question with the dynamically generated responses. The question type can be either Single list or Multiple list.

  3. Select the option Load responses from server-side script and type in your script. It will look something like this:

    <% value1={STATE}; %>
    <%report counties.asc STATE=$value1 %>
    <option < %= STATE eq {CODE} ? 'SELECTED' %> value={CODE}>{LABEL}</option>
    </report>

    Where STATE is the field name of the first question and counties.asc (ASCII file) is the name of the response list file

  4. Create a response list file called counties.asc. It needs to be tab delimited and there needs to be columns named STATE, CODE, and LABEL. It should look something like this:

    STATECODELABEL
    AL1Autauga County
    AL2Baldwin County
    AL3Barbour County
    AS68Aleutians East Borough
    AS69Aleutians West
    AS70Anchorage Borough
    CA95Alameda County
    CA96Alpine County
    CA97Amador County
    FL153Alachua County
    FL154Baker County
    FL155Bay County
    WA220Adams County
    WA221Asotin County
    WA222Benton County

    CODE is the field name, LABEL is the field text, and STATE is the query value.

  5. Publish your web form and upload the ASCII file the rest of your web files.

See also...