• Andrew

    (@rhdri)


    Hi,

    I’m unsure if what I want to do is already possible with Gravity Forms, or specifically with this Directory plugin.

    I have a wedding RSVP form created with Gravity Forms, and I want to be able to total up all of the entries for a specific field. Basically, I want to create a guest list based on the entries people submit. This directory add-on is very helpful, but I can’t figure out how to create a total number of guests using it.

    Here is the RSVP form: http://ryanandchristieswedding.com/rsvp/
    Here is the Guest List created with the directory plugin, showing all form entries: http://ryanandchristieswedding.com/guest-list/

    On this page I want a field at the bottom that will sum up the total number of guests that said yes. So all I need to do is add up the 2nd column (“HOW MANY PEOPLE ARE IN YOUR PARTY?”). I saw a calculations option in Gravity Forms fields choices, but that looks like a per-entry thing, instead of across all entries. Am I correct, or is there a way to assign number values to each entry and then calculate a final tally based on ALL the submitted entries?

    Any insight would be greatly appreciated!

    Thanks,
    Andrew

    https://wordpress.org/plugins/gravity-forms-addons/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Andrew;

    It looks like you figured this out, as I see at the bottom of the guest list a sum of “108 Total Guests in Attendance”. (Nice layout work on the directory list, by the way.)

    How did you do this? I have been scouring the internet looking for a way to do calculations on fields and have come up empty! Any guidance you can offer would be greatly appreciated.

    Thread Starter Andrew

    (@rhdri)

    HI DMHamm,

    It took me quite a while, but the amazing support at Gravity Forms helped me find a custom solution for this. I’ll try and share everything I can remember about what we modified, and hopefully it will be helpful to you.

    1. I started by installing this directory plugin: https://katz.co/plugins/gravity-forms-addons/

    2. Then I added the following code to my functions.php in my theme folder via FTP: http://pastebin.com/hdi6WXKN *(this code was based on this: http://pastebin.com/BU61sbjr ).

    3. Then I included this html + shortcodes on the actual guest list page in wordpress: http://pastebin.com/3JNx7CBC (seen on http://ryanandchristieswedding.com/guest-list/ )

    I don’t remember all of the details, but I know that a lot of this code is specific to the actual form I used (seen on http://ryanandchristieswedding.com/rsvp/ ). You would have to change field id’s and such. And formid=”” references the gravity forms id number, choice=”” references the actual choices available in the gravity form fields I specified, and the [guests] and [dinner] shortcodes are also referenced the the code in #2.

    If you have any questions, let me know and I’ll see if I can help!

    Thank you for this!!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Calculate total number / sum based on all submitted entries’ is closed to new replies.