Going "back" a page and keeping data

Home Forums Quform WordPress Going "back" a page and keeping data

This topic is: not resolved
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #15470
    brabox
    Participant

    Hello,
    I have a form which redirects to another page (via PHP) which has a PHP code that calculates the data to show to the client (front end).

    I would like to know if it is possible to keep the data (name, email, telephone number etc..) on the form when the client clicks “back” so he would not need to re-type all the data again.

    I would add a reset form button for those clients wanted to start fresh.

    Please let me know if this is possible,

    Thanks, Marco

    #15488
    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.

    #15496
    brabox
    Participant

    Hello Ally,

    Thanks for the quick response as always.

    I removed the code and it worked (windows / Firefox) and i also added a reset button.

    I have tested in some other machines and when I “return” back to the page it seems to reset.

    Any ideas?

    Thanks Marco.

    #15506
    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.

    #15513
    brabox
    Participant

    Hello Ally,

    Thanks for the code. It did work but now for some reason the reset button does not reset the form.

    #15524
    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.

    #15541
    brabox
    Participant

    Thank you Ally,

    I have tested and it worked now.

    Not sure why the previous code didn’t work but here is what i was using.

    <button class="resetbutton" onclick="jQuery(this).parents('.iphorm').resetForm(); jQuery.uniform.update();
    jQuery(document).ready(function ($) {$('.iphorm_13_2').focus();});return false;"><span class="resetbuttontext">Limpar Formulário</span></button>

    Anyways, thank you again!

    Marco

    #15542
    brabox
    Participant

    By the way. Just wanted to confirm if this code is correct. I added 2 more quforms to the original code you gave me.


    function my_save_form_values($form)
    {
    $_SESSION['quform-13']['quform-14']['quform-15'] = $form->getValues();
    }
    add_action('iphorm_post_process_13', 'my_save_form_values');
    add_action('iphorm_post_process_14', 'my_save_form_values');
    add_action('iphorm_post_process_15', 'my_save_form_values');

    function my_get_form_values($form)
    {
    if (isset($_SESSION['quform-13']['quform-14']['quform-15']) && is_array($_SESSION['quform-13']['quform-14']['quform-15'])) {
    $form->setValues($_SESSION['quform-13']['quform-14']['quform-15']);
    }
    }
    add_action ('iphorm_pre_display_13', 'my_get_form_values');
    add_action ('iphorm_pre_display_14', 'my_get_form_values');
    add_action ('iphorm_pre_display_15', 'my_get_form_values');

    Thanks.

    #15568
    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.

    #15571
    brabox
    Participant

    Thank you Ally,

    I will try your code.

    You guys have a great support team!.

    =)

    Marco

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.
Be inspired. © 2024 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy