Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor David Cramer

    (@desertsnowman)

    Hi There,

    What you can do, is use the magic_tags method to get a field value.
    When a form submits, you get a submission ID passed back $_GET['cf_id']. With this you can get any field value if you know the field slug.

    lets say you want to get ‘name’ and ’email’;

    $name = Caldera_Forms::do_magic_tags( '%name%', $_GET['cf_id'] );
    $email = Caldera_Forms::do_magic_tags( '%email%', $_GET['cf_id'] );

    The magic tags method converts full strings with multiple fields. So you can also do:

    echo Caldera_Forms::do_magic_tags( '%name% <%email%>', $_GET['cf_id'] );

    Thread Starter wynot

    (@wynot)

    Hi David – Thank YOU!!!!
    It didn’t work at first… I am using the Shortcode Exec Plugin on the page that I am needing the form posted data.

    I was getting the following error:

    Fatal error: Class 'Caldera_Forms' not found in
    /home/mold8788/public_html/moldtestco/wp-content/plugins/shortcode-exec-php/shortcode-exec-php-class.php(895) : eval()'d code on line 6

    So googled some more and discovered that I needed to include the Caldera_Forms class in my shortcode like this:

    include_once WP_PLUGIN_DIR . '/caldera-forms/classes/core.php';

    After doing that it works!

    I’m still learning WordPress PHP so wanted to ask if you foresee any issues that might arise from doing this? OR is there a better or more correct way to accomplish it?

    Thanks So Much for your responses .. I would never be able to do this otherwise 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Redirect and send form data to another page’ is closed to new replies.