WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form 7
how to filter content inside message body,display differently in different page? (1 post)

  1. cyngate
    Member
    Posted 1 year ago #

    I have two page sharing the same contact form,
    one with product enquiry list+ contact,
    one with only contact
    i append the product enquiry list using javascript in the hidden empty product enquiry field.

    so in the message body i have extra field inside my contact form
    ...
    ..
    Product Enquiry
    [your-enquiry]
    ..
    ..
    .

    Is there other way to do without putting a constant value, and hack the sendmail by filter it out using str_replace("Product Enquiry <br/>No Enquiry ","",string)
    before sending through wp_mail();

    for example, if no product the the javascript will append "No Enquiry" to this hidden field, so in the contact page

    ....
    Product Enquiry
    No Enquiry
    .
    can be filtered out

    http://wordpress.org/extend/plugins/contact-form-7/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic