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.

Total the number of boxes checked

  1. I need to create a questionnaire where for each question, I have about 10 checkboxes. The client can select as many as they want. Example Question 1: 'Which of these traits best describes you?' Client can check as many boxes as they want from the following list 'Aggressive, Aloof, Bold, Demanding, Determined, Dynamic, Fashionable, Glamorous, Intense, Mysterious, etc'. If client checks 7 boxes, I would like the Form to say that for Question 1, the client checked 7 boxes, for Question 2, the client checked 3 boxes and so on. Is this possible?
    Secondly, if my questionnaire has Section 1, Section 2 and Section 3, and each Section has 10 questions each, making a total of 30 questions, can I ask the form; give me the sum total of all the Question 1s in the 3 sections? For example, in Section 1 Question 1, client scored 2 and in Section 2 Question 1, client scored 3 and in Section 3 Question 1, client scored 5, the form can tell me 'The total score for all the Question 1s is 10'. Is this possible and no, I am not a developer!
    Many thanks,
    Chaka

    Posted 11 years ago on Friday May 31, 2013 | Permalink
  2. You can accomplish the first part (counting the number of boxes checked) by using jQuery on the front end, or using the gform_pre_submission_filter to get the total when the form is submitted.

    http://stackoverflow.com/q/1957290
    http://www.gravityhelp.com/documentation/page/Gform_pre_submission_filter

    For the second part, you can do this using the gform_pre_submission_filter again. I did something similar here once: http://gravity.chrishajer.com/leadership-iq-test/

    Description here: http://www.gravityhelp.com/forums/topic/mathematics-to-gravity-forms
    (although you will need to have a Gravity Forms license to view that last link)

    Posted 11 years ago on Monday June 3, 2013 | Permalink