• 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

    https://www.ads-software.com/extend/plugins/contact-form-7/

  • The topic ‘how to filter content inside message body,display differently in different page?’ is closed to new replies.