Pass form data to landing page in V2

Home Forums Quform WordPress Pass form data to landing page in V2

This topic is: not resolved

This topic contains 2 replies, has 2 voices, and was last updated by  Ally 6 months, 1 week ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #24618

    airweb7
    Participant

    Hello

    I’m trying to pass form data to a page but i have always the message “No datas form found”


    function my_save_form_data( $form )
    {
    $_SESSION['quform_6'] = $form;
    }
    add_filter('quform_post_process_6', 'my_save_form_data', 10, 2);

    and


    function my_display_form_data_6( )
    {

    $output = '';

    if (class_exists('Quform_Form') && isset($_SESSION['quform_6']) && $_SESSION['quform_6'] instanceof Quform_Form) {
    $form = $_SESSION['quform_6'];

    $output .= '<h2>Merci, ' . $form->getValueHtml('quform_6_14') . '!</h2>';
    $output .= '<h3>Nous avons bien reçu votre demande de réservation.</h3>';

    $output .= '<table>';

    $output .= '<tr><td>Name</td><td>' . $form->getValueHtml('quform_6_14') . '</td></tr>';
    $output .= '<tr><td>Email</td><td>' . $form->getValueHtml('quform_6_18') . '</td></tr>';
    $output .= '<tr><td>Message</td><td>' . $form->getValueHtml('quform_6_24') . '</td></tr>';

    $output .= '</table>';

    } else {
    $output .= 'Données du formulaire introuvables !';
    }

    return $output;
    }
    add_shortcode('my_display_form_data_6', 'my_display_form_data_6');

    Thank you for your help

    • This topic was modified 6 months, 1 week ago by  airweb7.
    #24620

    airweb7
    Participant

    Hello

    I found another way to do it

    Adding to functions.php


    function URLParam( $atts ) {
    extract( shortcode_atts( array(
    'param' => 'param',
    ), $atts ) );
    return $_GET[$param];
    }
    add_shortcode('URLParam', 'URLParam');

    Now in the page, use this shortcode :


    [URLParam param='booking_date']

    where “booking_date” is added as query string to the form “Confirmation settings” section :

    booking_date={element|id:21|Select date}

    #24670

    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    • This reply was modified 6 months, 1 week ago by  Ally.
Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.