WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form 7
[resolved] Math with Field Values for Email (5 posts)

  1. Salt5
    Member
    Posted 1 year ago #

    I want to have a form where someone can choose values between 1-10 for say 10 questions. I would then like to add all the values that they selected and show the user their "Total Score" in their autoresponse email that is sent to them after they fill out the form.

    Ideas?

    http://wordpress.org/extend/plugins/contact-form-7/

  2. Baden
    Member
    Posted 1 year ago #

    How well do you know jQuery? Have you ever build your own plugin?

    What we have done in simular situations is write a custom piece of jQuery that performs your math function each time the field values are changed. Wrapped this all in a nifty plugin to inject the script only on the pages we need it.

    Of course, for more detailed directions, you will need to provide a bit more info:

    1. how are the values entered?
      • radio buttons
      • user fills out text input
    2. do you want to display the total score, or simply have it included in the response email
    3. at which point do you want to calculate the score? Each time a value is entered/added/changed or when the user clicks a 'totals' button or the 'submit' button

    Good luck!

  3. Salt5
    Member
    Posted 1 year ago #

    Thanks for the quick response Baden!

    I know enough jQuery where I can usually reverse engineer something to work for myself and I've done a plugin or two, but very basic ones.

    1. Values will be entered via radio buttons/drop downs so we can control their values.
    2. Preferably would like to be able to do both, but email would be most important for now.
    3. It can be calculated when the user hits submit. No need to constantly change/update.

  4. Baden
    Member
    Posted 1 year ago #

    SaltyFiver,

    Kind of got carried away and went ahead and created a little plugin called Calc-O-Matic for you. Download the plugin, modify as needed. Let me know how it works for you.

    -Baden

  5. Salt5
    Member
    Posted 1 year ago #

    Works like a charm. Thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic