• Resolved pmt-lawyer

    (@pmt-lawyer)


    website: tancredilawkc.com
    I am trying to post a contact form on a page that is NOT primarily for contact (on the Pricing and Payments page). I’m trying to get the “Contact Form” to send emails and it’s sending but the email contains what is in the Message Body field:

    From: [your-name] <[your-email]>
    Subject: [your-subject]

    [your-message]


    This email was sent via contact form on the TancrediLawKC website (http://tancredilawkc.com) <— THIS

    The code in the Forms box is:

    <div class="row">
    		<div class="grid-1-3">
    			[text* Name placeholder "Name"]
    		</div>
    		<div class="grid-1-3">
    			[text* E-mail placeholder "E-mail"]
    		</div>
    		<div class="grid-1-3">
    			[text Phone placeholder "Phone"]
    		</div>
    	<div class="grid-1-1">
    		[text* Subject placeholder "Subject"]
    	</div>
    	<div class="grid-1-1">
    		[textarea* Message x6  placeholder "Your message..."]
    	</div>
    	<div style= "text-align: center;">[submit "Send Message →"]</div>
    </div>

    How do I get the phone number field to show, as well as get the content of the email, other than what is put in the “Message Body” field on the Contact Form settings page.

    https://wordpress.org/plugins/contact-form-7/

Viewing 4 replies - 1 through 4 (of 4 total)
  • The first thing I notice is that your tags don’t match, which will impair your ability to have the data properly displayed. I’m not sure I follow how your phone number field plays in here (if it’s a website display request or just an email display request), but let’s see how this goes:

    Based on your coded in the forms box, your mail form should contain:

    [Name] <- when you want the entered name
    [E-mail] <- when you want the entered email
    [Phone] <- when you want the entered phone #
    [Subject] <- when you want the entered subject

    Couple links that may help:
    Basics on how tags work
    Basics on setting up mail

    I think that will get you going in the right direction, but if not, just provide further clarification and coding and we’ll help some more. =)

    Thread Starter pmt-lawyer

    (@pmt-lawyer)

    I’ve viewed those links and the email for that contact form worked fine.

    The above code was auto-filled in that Forms box. I guess I don’t really need telephone number but I would like this form.

    I’ve viewed those links and it assisted me with one contact form but not this one. Maybe I’m over analyzing – I’m new to this.

    So how exactly am I supposed to code this? What am I supposed to change in the Forms section (no longer using telephone number tag) and what do I need to do in the Mail section to get the emails to send the correct content (person’s real name, email, subject and body of message)?

    What’s the shortcode you’re using to display the form on your pricing’s page?

    Also, the following code in your mail section will do nothing with the form data you want to use in your emails/submissions (based on what you provided above):

    From: [your-name] <[your-email]>
    Subject: [your-subject]

    [your-message]


    This email was sent via contact form on the TancrediLawKC website (http://tancredilawkc.com) <— THIS

    Instead, to get the equivalent of what that is trying to do, you would use:

    From: [Name] <[E-mail]>
    Subject: [Subject]

    [Message]


    This email was sent via contact form on the TancrediLawKC website (http://tancredilawkc.com) <— THIS

    If you want the phone in there, just add the [Phone] tag where you’d like to see it display. Anyway, try replacing with the above and see if it gets you going in the right direction now.

    Thread Starter pmt-lawyer

    (@pmt-lawyer)

    I finally got it to work. I know exactly what you mean now when you say the tags need to match. Thanks for your help.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Email sending text input, not content of email’ is closed to new replies.