• I have inherited a new client’s website and in the CF7 form there are a couple of configuration errors, which I’m not too concerned about. It is the 2 hidden fields on this form that i need help with, and it seems that when someone is responding to one of the units for sale the email at the receiving end is not showing a couple of hidden fields. It should show the URL of the item for sale and also the Stock Number, but it doesn’t. This is what the email result shows:

    1. Subject: Enquiry about post_title <post_url>
    2. Stock Number: custom_field-mfn-post-astocknumber

    What is wrong? Here is the code on CF7 form

    FORM TAB – 1 configuration error detected in this tab panel
    <div class=”section_wrapper clearfix”>
    <div class=”items_group clearfix” style=”padding: 40px 30px 0; margin: 40px; border: 1px solid #cdcdcd; background:#fcfcfcf;”>
    <h3 style=”color:#364349; padding-left:10px;”>Enquire Now</h3>
    <div class=”column one-second column_column”>
    [text* name placeholder “Name (Required)”]
    [email* email placeholder “Email (Required)”]
    [text* phone placeholder “Phone (Required)”]
    [text* address placeholder “Address”]
    [select astate “How did you find us?” “Google” “Other Search Engine” “Magazine Add” “Trading Post” “Motorhome Magazine” “Friend / Family” “Other”]
    </div>
    <div class=”column one-second column_column”>
    [textarea message placeholder “Message”]
    [submit ” SEND ENQUIRY”]
    </div>
    </div>
    </div>
    [hidden hidden-1 placeholder “post_title”]
    [hidden hidden-2 placeholder “custom_field-mfn-post-stocknumber”]
    [hidden hidden-3 placeholder “post_url”]

    MAIL TAB
    FROM – [name] <[email]> (configuration error) Sender email address does not belong to the site domain.
    BODY – From: [name] <[email]>

    Subject:
    Enquiry about [hidden-1]
    <[hidden-3]>

    Name: [name]
    Email: [email]
    Phone: [phone]
    Address: [address]
    State: [astate]

    Message: [message]

    Stock Number: [hidden-2]

    __________________________________________

    I have searched through the CF7 documentation so please don’t refer me to that, unless i have missed something specific. I’m just not sure what code to use in the FORM TAB & MAIL TAB to fix the issue of hidden field results. Thank you for your assistance.

Viewing 10 replies - 1 through 10 (of 10 total)
  • [hidden hidden-1 placeholder “post_title”]
    [hidden hidden-2 placeholder “custom_field-mfn-post-stocknumber”]
    [hidden hidden-3 placeholder “post_url”]

    Those are not form-tags from Contact Form 7, and must have been generated by another plugin. Contact form 7 does have special mail tags for post title [_post_title] and post url [_post_url]. Stock number would require some customisation.

    Thread Starter URLmedia

    (@urlmedia)

    Good pick up thank you barnez. I’ve just checked and yes there are 2 other plug-ins that are there: Contact Form 7 Modules: Hidden Fields & Contact Form 7 Modules: Send All Fields by Katz Web Services, Inc.

    Would you suggest deactivating them and adding [_post_title] and post url [_post_url] as a fix? The URL post does have the vehicle identifying name in it, so that would help. Whereabouts in the FORM TAB should i place the code and is that the full line to use?

    Thanks for your help

    • This reply was modified 6 years, 10 months ago by URLmedia.

    I would always aim to reduce the number of plugins where possible, as each install increase the risk of potential conflict.

    In the FORM replace:

    [hidden hidden-1 placeholder “post_title”]
    [hidden hidden-2 placeholder “custom_field-mfn-post-stocknumber”]
    [hidden hidden-3 placeholder “post_url”]

    With:

    [_post_title]
    [_post_url]

    And then in MAIL replace:

    Enquiry about [hidden-1]
    <[hidden-3]>

    With:

    Enquiry about [_post_title]
    <[_post_url]>

    Then delete the line Stock Number: [hidden-2], assuming you can identify that from the post title or url.

    Thread Starter URLmedia

    (@urlmedia)

    Thanks barnez I’ll give that a go. Much appreciated.

    Thread Starter URLmedia

    (@urlmedia)

    Hi barnez, the code
    [_post_title]
    [_post_url]
    now shows up on the page form as code, looks a bit messy. Is it possible to colour the code white so that it blends into the white background on the front end page? Do you think that will work?

    Thread Starter URLmedia

    (@urlmedia)

    very strange, just tested the form with the new code, and the email results shows blank. No URL or post name.

    Subject:
    Enquiry about
    <>

    Perhaps the code needs to go before the </div> tags?

    Thread Starter URLmedia

    (@urlmedia)

    tried putting the code before the </div> tags and it didn’t work. Still comes up blank:

    Subject:
    Enquiry about

    My mistake. These two mail-tags *only* need to be placed in the MAIL section e.g. in the Message Body field:

    Enquiry about [_post_title]
    <[_post_url]>
    Thread Starter URLmedia

    (@urlmedia)

    Hi barnez, thanks for replying. I placed the code in the MAIL section >> Message Body, and it still comes up blank on the email response. no post or title description.

    Does it need anything in the FORM section?

    I used that same code on a test installation (placed in the Message Body only) and it populates the email correctly with the post and url information. Are those other two CF7 helper plugins now disabled? What happens if you test by disabling all other plugins and switching to a default Twenty-Seventeen theme?

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Hidden Fields not showing in email results’ is closed to new replies.