PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Using Values and PHP Confirmation

  1. begatt
    Member

    On my latest form, I have used the Label/Value feature to assign numbers (1 - 5) to each response of the 20 questions.

    http://cochristianhe.org/dads/confidence-survey/

    When the form is submitted, the entry shows the admin the question number (1 - 20) and the value (1 - 5) selected by the participant.

    I would like to be able to add up the total value of all 20 responses to come up with a total value (20 - 100) and display that total value in the confirmation (whether text, page or redirect).

    Is this possible with code something like this (I am not a coder and so I don't know if this code even works)?

    $result = array("question1_value","question2_value",...,"question20_value");
    echo "Survey Result = ".array_sum($result);

    If it is possible, does this PHP have to be placed in my functions.php or should it be on the confirmation page in order for GF to be able to use it?

    Posted 13 years ago on Thursday August 19, 2010 | Permalink