• At the tutorial for Accessing Form Data via PHP (https://cfdbplugin.com/?page_id=367) there is a piece of code, whereas my question only relates to the following line of code:

    $exp->export('my-form', array('show' => 'name,email', 'search' => 'Mike'));

    I was wondering if there is a way to make the search criteria variable from a specific input field value on the contact form? So not hard-coded (in this case ‘Mike’) as in above line of code.

    • This topic was modified 7 years, 11 months ago by rg88j.
    • This topic was modified 7 years, 11 months ago by rg88j.
Viewing 1 replies (of 1 total)
  • Plugin Author Michael Simpson

    (@msimpson)

    You can certainly replace the hardcode ‘Mike’ with a PHP variable. In the array, you can add any (or none) of the shortcode attributes such as show, hide, filter, search, trans, limit, orderby.

    How you set that variable is up to you. If you are processing a form post that has a field named “search” then replace ‘Mike’ with $_REQUEST[‘search’] for example.

Viewing 1 replies (of 1 total)
  • The topic ‘How to make hard-coded search or filter criteria variable from input field value’ is closed to new replies.