WordPress.org

Support

Support » Plugins and Hacks » Contact Form 7 » [Resolved] Math with Field Values for Email

[Resolved] Math with Field Values for Email

  • 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/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Baden

    @baden03

    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!

    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.

    Baden

    @baden03

    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

    Works like a charm. Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Resolved] Math with Field Values for Email’ is closed to new replies.
Skip to toolbar