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.

Radio Buttons and Number Merge Tags

  1. Hi,

    I'm new to gravity forms but have a little bit of background in php and javascript. I've had a look at the leadership quiz examples mentioned in a number of the forum posts, but I saw the new number merge tag functionality and wondered if it could be an easier solution to what I am trying to accomplish.

    What I'm doing is taking medical questionnaires where each question has a severity of 1 - 5 via a radio button for each, and then tabulating the results, where each higher range of numbers triggers a different message. My main stumbling point is finding each radio button's ID, so I can assign a value to it.

    I suppose I could do the method shown in the leadership quiz examples, but I can't seem to find a method to modify it for my purposes without a lot of code-bloat. If I could use a merge tag to sum the values of the radio fields in a number box that would be most helpful.

    Thanks a ton,
    Zephyr

    Posted 11 years ago on Tuesday August 28, 2012 | Permalink
  2. The radio button IDs can be found by viewing the source of the page where the form is embedded. I usually do this in the form preview because it is the least cluttered.

    You can also dump the $entry object with var_dump or print_r in a gform_after_submission hook. But viewing the source will normally get you the IDs you need. Let us know if you need more help with that.

    If you post a link to your form online we might be able to help by viewing the source there as well.

    Posted 11 years ago on Saturday September 1, 2012 | Permalink