• Resolved ten-em

    (@ten-em)


    Hi,

    I am using the plugin on my main contact form to display a choice of 6 other forms.

    However when I test the form the some of the conditional fields in the From field and Message Body aren’t coming through.

    They are:

    [your-first-name]
    [your-last-name]
    [your-email]
    [your-company]
    [your-tel]

    I am using these same tags in all 6 forms so I can capture the data without having to create new tags for every form – for example I want to capture the first name of the user without having to create [your-first-name-form-1] [your-first-name-form-2].

    But it seems this might be causing a problem.

    Is there something I’m doing wrong?

    The full code for the Message Body is this:

    From: [your-first-name] [your-last-name] <[your-email]>

    Company: [your-company]
    Address: [your-address]
    Telephone number: [your-tel]

    Type of enquiry: [checkbox-select]

    How did they hear about us: [menu-referral]

    Debt Collection details (if applicable):

    Debtor details:

    Company: [debtor-company-name]

    Contact name: [debtor-company-contact]

    Company registration number: [debtor-company-registration]

    Legal entity: [debtor-legal-entity]

    Address:
    [debtor-address]

    Telephone number: [debtor-tel]

    Email: [debtor-email]

    Amount outstanding: [debtor-amount-outstanding]

    Invoice due date: [debtor-invoice-due-date]

    Additional info:
    [debtor-additional-info]

    Trace Services enquiry details (if applicable):

    Name of person to be traced: [trace-name]

    Relationship to customer: [trace-relationship]

    Reason for trace: [trace-reason]

    Company Search enquiry details (if applicable):

    Company to search: [company-search-name]

    Company number: [company-search-number]

    Person of interest: [company-search-person]

    Process Serving enquiry (if applicable):

    Documents to serve: [checkbox-documents]

    Credit Control enquiry (if applicable):
    Message:
    [your-message]

    General Enquiry (if applicable):
    Message:
    [your-message]

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Jules Colle

    (@jules-colle)

    Hi! You figured it out yourself 🙂

    You need to rename your fields to [your-first-name-form-1] etc.

    Quote from the FAQ:

    All field names should be unique

    Even though your fields might never show up at the same time, it is still important to realize that WPCF7CF will not remove the fields, it merely hides them. So all fields will be submitted when the form is sent. Because of this no two fields can have the same name.

    Incorrect form (2 input elements having the same name “a”):

    [group group-1][select a "1" "2" "3"][/group]
    [group group-2][select a "1" "2" "3"][/group]

    Correct form (all groups and fields have unique names):

    [group group-1][select a "1" "2" "3"][/group]
    [group group-2][select b "1" "2" "3"][/group]
    Thread Starter ten-em

    (@ten-em)

    Thanks Jules,

    Yes I updated the fields so they have unique names, and now it’s working fine.

    Plugin Author Jules Colle

    (@jules-colle)

    Glad to help! Feel free to leave a tiny review if you’re in the mood for it 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Some conditional fields not working in Message Body and From field’ is closed to new replies.