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?
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.
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.
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.
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?
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.