• Resolved scamrwordpressadmin

    (@scamrwordpressadmin)


    I have followed the instructions from https://cfdbplugin.com/?page_id=804 CF7 Menus with Pipes, to enable users to see a friendly name, but have the mail go to the person’s actual email address.

    In Shortcodes, Actions & Filters I added the function form_with_pipes_handler, copied exactly from the above page, with no changes. It is activated.

    I then added the smaller code function, updating the $formName and $fieldName, and function name as instructed. This too is activated.

    function email_form_handler($formData) // Use a different function name for each form
    {
        $formName = 'Hike_Sign_Up_Form'; // change this to your form's name
        $fieldName = 'hike_lead'; // change this to your field's name
        $newFieldName = $fieldName.'_email';
        return form_with_pipes_handler($formName, $fieldName, $newFieldName, $formData);
    }
    add_filter('cfdb_form_data', 'email_form_handler'); // ensure 2nd param matches above function name

    When a user signs up, they successfully select the hike_lead’s friendly name, and in the db, the $newFieldName is created with the actual email address in it. So far so good.

    When I updated the contact for, -> Email tab -> TO: field, the [hike_lead] field is grayed out. I tried entering it as ([hike_lead]) per the instructions, but the TO field remains gray with syntax errors. In searching the support forums, I saw that someone else had a similar issue and they were told to check their php code. Unfortunately the final resolution wasn’t posted, and I am not sure what php code to look for.

    Any pointers would be greatly appreciated.

    Thanks!

Viewing 1 replies (of 1 total)
  • Thread Starter scamrwordpressadmin

    (@scamrwordpressadmin)

    Deleted everything in the TO: field on the mail form, and then retyped it back in. Now all works fine. Not sure what is different, but it’s working, so closing this one out.

Viewing 1 replies (of 1 total)
  • The topic ‘CF7 menu with pipes – Mail TO: hs syntax error’ is closed to new replies.