• I am in the middle of making a basic sign up form where parents sign their kids up to various art classes that I teach. They can select any number of classes and then either with a fill in field or pull down enter the number of kids per class.

    Once they hit submit, I need to send them a confirmation email using email(2) that includes the classes they signed up for.

    What I would like is to pass this info to that email.
    Key = [ # ] is the fill in field.

    [ 0 ] Class #1 – 3pm – $10 per child
    [ 2 ] Class #2 – 1pm – $30 per child
    [ 1 ] Class #3 – 10am – $10 per child
    [ 0 ] Class #4 – 11am – $20 per child

    I have no idea how to do this and I’m not a programmer, unfortunately. I know I need to use the “on_sent_ok” function but that’s it, no idea how to pass the variables over to the confirmation email. Any help and guidance is really appreciated, thank you!

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Takayuki Miyoshi

    (@takayukister)

    I’m not really sure what you are trying to do. More explanation is needed. What does the form content look like? How do you set up the mail?

    I know I need to use the “on_sent_ok” function

    I don’t think so. on_sent_ok isn’t relevant at all to this issue.

    Thread Starter Esch

    (@esch)

    I’m sorry it’s not clear. After re-reading what I typed I can see why. It’s been a long day. Let me try again and make some heavy modifications to it now that I’ve looked at things a little closer.

    Let’s say the following are classes people sign up for. The text fill in box is to put the number of children they want to attend for each class.

    <p>[text class-one size:5] – Class #1 at 1pm – $10 per child</p>
    <p>[text class-two size:5] – Class #2 at 3pm – $30 per child</p>

    I can send the “class-one” and “class-two” variables to mail(2) in a confirmation email to the person who signed up, but all they will see is the numbers they entered and not the actual class names listed next to them.

    What I need is to append “ – Class #1 at 1pm – $10 per child” and the other one behind the number of kids who signed up into this confirmation email using email(2). Is there a way to do this?

    The other thing I need for it to do is to only send the classes they entered numbers into, so any blank fields are not sent.

    I hope this is clearer, if not please ask.

    Thanks again!

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    I’m still not sure, but I guess what you are looking for is rather checkbox, not text. Try replacing it with [checkbox class-one "Class #1 at 1pm – $10 per child"].

    Thread Starter Esch

    (@esch)

    Some families sign up more than one kid, so simply having a checkbox won’t work in my case because that won’t give them the option to register more than one kid.

    So there is no hidden variable that can be transferred over into the mail(2) email?

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    Why don’t you just put the text out of the field value like this:

    In Form:
    Class #1 at 1pm – $10 per child [number class-one "0"]

    In Mail:
    Class #1 at 1pm – $10 per child: [class-one]

    Thread Starter Esch

    (@esch)

    Because there will be several different classes on the same form, and I didn’t want classes that they didn’t select to pass to the email stage.

    The solution I am reluctantly going with right now is to just have each class inside individual pulldown menus and have the information inside repeat, allowing the parents to change the number of children signing up. This way it’s guaranteed that what they select will have ALL of that info stored in a variable to carry over to the email.

    CLASS ONE
    [select menu-class1 include_blank “1 Kid / CLASS #1 – $20” “2 Kids / CLASS #1 – $40” “3 Kids / CLASS #1 – $60”]

    CLASS TWO
    [select menu-class2 include_blank “1 Kid / CLASS #2 – $10” “2 Kids / CLASS #2 – $20” “3 Kids / CLASS #2 – $30”]

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    You can use the Exclude lines with blank mail-tags from output setting.

    See Setting Up Mail

    Thread Starter Esch

    (@esch)

    Thanks I will look into it! ??

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘How to pass data to ‘extra settings” section’ is closed to new replies.