Support » Plugins » HTML CODE for Email

  • Springfieldgamerchants

    (@springfieldgamerchants)


    I am no coder. I found a form in HTML online that I like and have coded and customized to fit my needs. I have “radio” buttons within the form. What is the HTLM code I need to put in my action form to recieve the correct selection in my email. I have supplied the part of my code that makes the radio buttons.

    <td>Catagory:</td>
    <td>
    12×12 Booth $50.00 each For Arts, Craft, and Antiques
    <input type=”radio” name=”Catagory” value=”Hand Made Crafts” />Hand Made Crafts
    <input type=”radio” name=”Catagory” value=”Resale” /> Resale
    <input type=”radio” name=”Catagory” value=”Antiques” /> Antiques
    1 Booth Free with requirements
    <input type=”radio” name=”Catagory” value=”Non-Profit (Activity for kids)” /> Non-profit
    Food Booths $75.00 no electric and $100.00 with electric
    <input type=”radio” name=”Catagory” value=”Food” /> Food
    </td>
    </tr>
    <tr><td>Payment Method:</td>
    <td>
    <input type=”checkbox” name=”Patment Method” value=”Paypal” />Paypal
    <input type=”checkbox” name=”Patment Method” value=”Mail Check” /> Mail Check
    <input type=”checkbox” name=”Patment Method” value=”Pay Day of Event” /> Pay Day of Event
    Payments made after August 31st will require a $20.00 up charge per vendor.
    </td>

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator Kathryn

    (@zoonini)

    Automattic Happiness Engineer

    You can’t create the type of form you’re looking for with with HTML alone, since the form needs to interact with a form script, which is usually written in PHP.

    If you’re not comfortable with PHP, I recommend you use a form plug-in. There are many form options in the plug-in repository, a common one is Contact Form 7.

    Springfieldgamerchants

    (@springfieldgamerchants)

    Thanks for your reply zoonini. I am using the Contact Form 7 you made note of. I went into the form content area and changed the code with the HTML above. My problem is with extracting the data and having it send me the information I need to my email. I was able to get the information you enter in the text boxes but not the information you select with the Checkboxes and the radio buttons. I could change them to text boxes but it would be more stream line if I could make them select an option.

    What is the code I need to get the selections to pull over to the email?

    Jamey

    Moderator Kathryn

    (@zoonini)

    Automattic Happiness Engineer

    Try following the examples in the Contact Form 7 documentation for checkboxes and radio buttons:

    Checkboxes, Radio Buttons and Menus

    Moderator Kathryn

    (@zoonini)

    Automattic Happiness Engineer

    Take note that with Contact Form 7 you need to use their shortcodes – the stuff betweeen square brackets [] which generates the HTML for you. You don’t add HTML directly.

    Springfieldgamerchants

    (@springfieldgamerchants)

    I may be over my head on this one. I have review the link above. I got the form the way I want it. I dont know what to type in the email portion to retrive the information form the selected raio button. Every thing I put into the email form that i receive doesnt give the radio select. instead it gives me the code I wrote.

    Email I get

    From: OT
    Subject: New Vendor

    Message Body:
    Business: OT
    Contact: JDS
    Mailing Address: 100 Main
    Phone: 912-212-2321
    Email: OT@Jas.com

    Catagory :
    <input type=”radio” value=”1′”name=”Hand Made Crafts”>Yes<input type=”Hand Made Crafts” value=”2″ name=”radbut”>No
    <input type=”radio” value=”1′”name=”Resale”>Yes<input type=”Resale” value=”2″ name=”Resale”>No
    <input type=”radio” value=”1′”name=”Antiques”>Yes<input type=”Antiques” value=”2″ name=”No”>No
    <input type=”radio” value=”1′”name=”Food”>Yes<input type=”Food” value=”2″ name=”No”>xx

    Moderator Kathryn

    (@zoonini)

    Automattic Happiness Engineer

    That’s because you cannot use HTML for your radio buttons, as you’ve done above. (Also, your HTML is incorrectly coded – but that’s a moot point here.)

    You must code them the way Contact Form 7 requires them, using proper shortcodes instead.

    For example, try:

    Category:
    [radio hand-made-crafts "Yes" "No"]

    … for the first button, and follow suit for the rest.

    Scroll down to the Demo section of the page I linked earlier to look at the example.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘HTML CODE for Email’ is closed to new replies.