Survey/Form Response

The Survey HAPI component will pull data related to a user's form/survey response for a specific form/survey

This can be used in conjunction with a triggered newsletter for a form/survey completed action

<div data-pv-component="survey" data-pv-type="response" data-pv-parameters="{customer_no:{@var_customer_no@},survey_no:{@referenceType.survey@},survey_response_no:{@referenceType.survey_response@}}">
        
        <p>{@field_1234_5678@}</p>
        
        <li data-pv-repeater="responses">
            <span data-pv-element="field_label">Field Label</span>:
            <span data-pv-element="survey_answer">Response</span>
        </li>
</div>

You will also need to know the question's field_no, this can be found on the survey by navigating to the survey on the Control Panel and selecting "View Questions"

There are two ways to pull back the survey responses:

  1. The exact response - {@field_1234_1234@} will pull back the exact value answered for the question

  2. All of the responses in a repeater - this will loop through all of the responses and display each one

<li data-pv-repeater="responses">
        <span data-pv-element="field_label">Field Label</span>:
        <span data-pv-element="survey_answer">Response</span>
</li>

Last updated