• Resolved upyria

    (@upyria)


    Hi @codepeople.

    It’s possible to apply to the Previous Button the function of Reset Data?
    I explain me.

    I find the topic with the Button solution with Reset, but we need to give the Previous Button this function so our Client get back to the first page with clean choices to apply.

    Hope I explain me better and thanks in advance for suggestions.

    PS: the Button solution it’s not suitable for us ’cause it’s merged in the form and not in the default button section (Submit and Previous ones).

    The page I need help with: [log in to see the link]

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @upyria

    You can insert an “HTML Content” field in the form with the piece of code:

    <script>
    jQuery(document).on('click', '.pbPrevious', function(){
    jQuery(this).closest('form')[0].reset();
    });
    </script>

    Best regards.

    Thread Starter upyria

    (@upyria)

    Hi @codepeople and thanks for fast response.
    I’ve insertd the HTML Content with the code (<%fieldname103%>), but it does not function.

    In the first page I select choices, then go Next and if I push Nuovo Prospetto(Previous Button), it sends me to the first pages, but data are the same, not the inizial ones.

    Where I’m wrong?

    Plugin Author codepeople

    (@codepeople)

    Hello @upyria

    If you have installed a plugin to manage the website’s cache, I recommend you purge it after editing the form.

    Best regards.

    Thread Starter upyria

    (@upyria)

    Hi @codepeople.

    We’re using SG Optimizer, ’cause we’re on Siteground.
    I’ve disabled the plugin site-side and wiped the cache from Siteground Admin Panel, but no changes happen.

    I leave the situation as it is till your next response, in order to give you the possibility to test it.

    Thanks for support.

    EDIT 10.43 am: Just to be certain, I polished Dynamic Cache and Memcache too. Maybe there is some way to esclude the CFF code from caching or this particular piece of code? I don’t know.

    • This reply was modified 4 years, 11 months ago by upyria.
    Plugin Author codepeople

    (@codepeople)

    Hello @upyria

    Please, change the event’s name in the piece of code I sent you previously as follows:

    <script>
    jQuery(document).on('mousedown', '.pbPrevious', function(){
    jQuery(this).closest('form')[0].reset();
    });
    </script>

    Best regards.

    Thread Starter upyria

    (@upyria)

    Hi @codepeople.

    Premise: Caching is always disabled site-site and purging cache from SG admin panel.

    Now, on click here what it happens:

    1) The 2nd page refresh with the default data.
    2) I need to click again to get back to the 1st page.

    Problems:
    a) It’s possible to get back to the 1st page in a single click?
    b) If I select “Tutela Legale Penale e Peritale” as NO, when I get back to the 1st page it reverts to SI, but the conditional field connected (Tutela Legale Penale e Peritale – Massimale) does not appear.

    Thank you for support.

    Plugin Author codepeople

    (@codepeople)

    Hello @upyria

    I’ve tested your form and it is working fine. Please, watch the video by visiting the following link:

    https://wordpress.dwbooster.com/customdownloads/2021/06/30/video_o.mp4

    Best regards.

    Thread Starter upyria

    (@upyria)

    Hi @codepeople,

    We’ve tried many times, with cache purged, on many PCs and with different browser in guest session, but it always gives wrong results.
    As you well do before, I’ll provide you a video to mark better the problems:

    https://www.awesomescreenshot.com/video/4317363?key=6b02a98a5e496cab8c578f4742a7dc45

    Thanks for patience and support.

    Plugin Author codepeople

    (@codepeople)

    Hello @upyria

    You can edit the code to reset the values after returning to the previous page as follows:

    <script>
    jQuery(document).on('mousedown', '.pbPrevious', function(){
    var me = this;
    setTimeout(function(){jQuery(me).closest('form')[0].reset();},500);
    });
    </script>

    Best regards.

    Thread Starter upyria

    (@upyria)

    Hi @codepeople!

    Now it goes WELL, except for the dependacy of the field “Tutela Legale Penale e Peritale” as NO, when I get back to the 1st page it reverts to SI, but the conditional field connected (Tutela Legale Penale e Peritale – Massimale) does not appear.

    Any idea about?

    Plugin Author codepeople

    (@codepeople)

    Hello @upyria

    Please, note you are requesting customization. I’ve tried to help you through the WordPress forum. But to request an official custom coding service you should contact us through our private website: Click Here

    Best regards.

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Previous Button with Data Reset’ is closed to new replies.