• Resolved carryoncoding

    (@carryoncoding)


    Hello,

    I have setup a multi-step form using the Contact Form 7 Multi-Step Forms plugin.

    On Step 2 of my Multi-Step Form, I have some Conditional Fields setup using CF7 Conditional Fields, along with some standard fields. The conditional fields work fine on screen (hidden unless required).

    In step 4 (the final step) of the multi-step form, I have brought forward all the fields from previous steps using [hidden field-name].

    When the e-mail is sent from step 4, it lists all the field labels – including those that should be hidden. But it doesn’t output any field values for any fields from step 2. Labels and values for steps 1, 3 and 4 are output correctly in the e-mail.

    In the e-mail, at the top of the step 2 area, before the list of field labels, it lists all the “close” control codes:

    [/first-marriage] [/second-marriage] [/third-marriage] [/fourth-marriage] [/first-child] [/second-child] [/third-child] [/fourth-child] [/fifth-child]

    I’m unsure whether there are multiple issues going on here or if it’s more simple than that.

    Please could you advise?
    Thanks,
    Phil.

    • This topic was modified 8 years, 2 months ago by carryoncoding.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author webheadcoder

    (@webheadllc)

    Hi,

    There are a couple things you can try. First, please use [multiform field-name] to display fields from previous steps. Second, if you’re showing groups on your final step that depend on groups from previous steps you can also use the multiform tag like so (make sure to include the double quotes):

    [multiform "group-1"]
      [multiform field-1]
    [/multiform]
    [multiform "group-2"]
      [multiform field-2]
    [/multiform]
    Thread Starter carryoncoding

    (@carryoncoding)

    Thanks for your suggestion. I have built a set of test forms based upon the original, and incorporated your advice above.

    The e-mail now shows:

    [multiform "first-marriage"] [/multiform]
    Name of first (or only) spouse:	[multiform one-spouse-name]

    so those codes are still coming through to the e-mail and the values are not being output.

    The html for that part of the email looks like this:

    [multiform "first-marriage"]
      <tr>
        <td width="270" valign="top" style="padding: 2px 5px 2px 10px; color: #153643; font-family: Arial, sans-serif; font-size: 14px; line-height: 14px;" align="right">
          Name of first (or only) spouse:
        </td>
        <td width="270" valign="top" style="padding: 2px 10px 2px 5px; color: #153643; font-family: Arial, sans-serif; font-size: 14px; line-height: 14px;">
    	[multiform one-spouse-name]
        </td>
      </tr>
    [/multiform]

    Any further thoughts welcome.
    Kind regards,
    Phil.

    • This reply was modified 8 years, 1 month ago by carryoncoding.
    • This reply was modified 8 years, 1 month ago by carryoncoding. Reason: Tidied up html
    Plugin Author webheadcoder

    (@webheadllc)

    For email, just use [first-marriage]. The multiform part is only for the forms.

    Thread Starter carryoncoding

    (@carryoncoding)

    Thanks. I set up a minimum set of multipart forms. But I’m getting some inconsistent behaviour during testing. As I build up the forms with conditions, there comes a point when the codes show up in the html email and the rows that should be hiddden (as in my note above). Its as if suddenly it doesn’t understand the conditional codes.

    If I back off by removing the one row that caused the error – no change.

    I need to remove multiple rows before the error disappears. It’s making fault-finding very difficult! Is this expected behaviour due to some sort of caching or have I got it set up wrong?
    Kind regards,
    Phil.

    Plugin Author webheadcoder

    (@webheadllc)

    Unfortunately that’s a limitation in the free version. The free version uses cookies to remember data from previous steps. After the cookie limit is reached it can’t pass on any more data and things get lost before it sends the email. You’ll need to purchase the pro version.

    more info here:
    https://webheadcoder.com/too-many-cookies/

    Thread Starter carryoncoding

    (@carryoncoding)

    Thanks for persevering with this and identifying the problem. It’s taken many hours of testing and changing builds and re-testing to get to this point.

    That threshold seems to be reached quite early, as in with only small test forms but thanks for identifying it.

    Off to get the premium version!
    Kind regards,
    Phil.

    Plugin Author webheadcoder

    (@webheadllc)

    No problem. Thank you for doing a bunch of debugging on your own. It makes it much easier to understand the issue.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘CF7 multi-step and conditional logic in html e-mail’ is closed to new replies.