HTML CODE for Email (7 posts)

  1. Springfieldgamerchants
    Posted 4 years ago #

    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.

    12x12 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
    <tr><td>Payment Method:</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.

  2. 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.

  3. Springfieldgamerchants
    Posted 4 years ago #

    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?


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


  5. 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.

  6. Springfieldgamerchants
    Posted 4 years ago #

    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

  7. 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:

    [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.

Topic Closed

This topic has been closed to new replies.

About this Topic