Support » Plugin: Contact Form 7 Database + | CFDB+ » Form field not recognized by plugin

  • Resolved cag8f

    (@cag8f)


    Hello. I have a form on my site with a custom PHP handler. Per the plugin documentation, I have added custom PHP code to ensure the form data is correctly sent to the plugin, so the plugin can record the data. That has been working without issue for several months (or maybe years by now). I have now added a new field to this form, and have modified my PHP code to ensure this new field is sent to the plugin. But when I submit the form, the plugin does not recognize this new field. Specifically, if I open Dashboard-..Contactic–>Overview, and select the form in-question, I can see this form submission. The page displays all of the fields except this new field. Any ideas how to troubleshoot? I should note that in my PHP error log, there is an entry:

    PHP Notice: Undefined index: original_referer in /home/horizon/domains/horizonhomes-samui.com/dev/public/wp-content/plugins/contactic/ContacticPlugin.php on line 935

    I’m not sure if that is related to my issues.

    My custom PHP code to send form data to the plugin is below. The new field is $form_data[‘propid’]:

                            $form_data = array(
                                'name'      => $_POST['name'],
                                'email'     => $_POST['email'],
                                'email-cp'  => $_POST['email'] . ",",
                                'message'   => $_POST['message'],
                                'propid'    => $_POST['propid'],
                                'page'      => esc_url( get_permalink( ))
                            );
    
                            error_log(print_r("Print form data",true));
                            error_log(print_r($form_data,true));
    
                            $title = "Inquiry Form - Agents Page";
                            // Prepare data structure for call to hook
                            $data = (object) array(
                                'title'          => $title,
                                'posted_data'    => $form_data,
                                'uploaded_files' => array()
                            );
                            // Call hook to submit data
                            do_action( 'cfdb_submit', $data );
Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author francois86

    (@francois86)

    Hello @cag8f, thank you for the feedback, it’s something that is fixed in our 1.4 that will be released tomorrow.

    Plugin Author francois86

    (@francois86)

    1.4 is now available.
    Best Regards.

    Thread Starter cag8f

    (@cag8f)

    Hello. I updated the plugin to version 1.4 and re-tested, but the issue is still present. Specifically, on my page is a form with several fields–one is a field named propid. When I submit the form, in the WordPress back-end, in Contactic–>Contacts, I see that Contactic recognizes that the form has been received. It displays the form and all its fields *except* the ‘propid’ field. But, if I click ‘Column Visibility,’ I see propid in the list. So Contactic *does* seem to know that a field name propid exists (screenshots). Thoughts on that?

    Plugin Author francois86

    (@francois86)

    Hello,
    sorry I thought it was related to your php notice.
    If you see the “propid” in the column visibility list, that means that you have data for this field in the DB. You confirm you don’t get the field in the list or exports ? (did you try to change fields visibilities to try to display it ?

    Thanks,
    Best regards.

    Thread Starter cag8f

    (@cag8f)

    >> You confirm you don’t get the field in the list or exports ?

    As you can see in my screenshots, propid appears when I click ‘Visibilities.’ But in the table, there is no propid column.

    >> did you try to change fields visibilities to try to display it ?

    How exactly can I do that? If you want me to open ‘Visibilities,’ then click propid, then yes, I have already tried that. Nothing occurs when I do so.

    Thanks.

    Thread Starter cag8f

    (@cag8f)

    Hello, any update on this?

    Plugin Author francois86

    (@francois86)

    Hello,
    I’m not able to reproduce it, do you confirm it does not exist in export (in xls for example) ? I can’t see all columns on your screenshot because of the bottom horizontal scrollbar.

    Thanks,
    Best regards.

    Thread Starter cag8f

    (@cag8f)

    >> because of the bottom horizontal scrollbar.

    Well, that was the issue 🙂 I didn’t see the horizontal scroll bar. We can consider this resolved.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Form field not recognized by plugin’ is closed to new replies.