Skip Navigation

[Resolved] CRED reload page but AJAX specified

This support ticket is created 6 years ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Our next available supporter will start replying to tickets in about 0.62 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 3 replies, has 2 voices.

Last updated by Waqar 6 years ago.

Assisted by: Waqar.

Author
Posts
#1144449

Hello

I create the form with custom fields

and setup
Submit this form without reloading the page (use AJAX)
and
Display a message instead

But my page is refreshed after submission
As I can see, the AJAX request returns following

{"result":"redirect","is_ajax":true,"output":"<p>\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043f\u043e\u0434\u043e\u0436\u0434\u0438\u0442\u0435. \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435...<\/p><script type='text\/javascript'>document.location='\/tech-kruzhok\/?_tt=1541935609&_success_message=91_1&_target=141#cred_form_91_1';<\/script>","formtype":"new"}

As I can understand the point is

document.location=...

returned
How to avoid that

Thank you

#1144882

Hi there,

Thank you for contacting us and I'll be happy to assist.

When "Display a message instead of the form..." option is selected, the page is only partially reloaded and the URL parameters are added, when the AJAX submission option is checked.

To avoid any type of reloading, redirection or URL parameters, you can select the option "Keep displaying this form" option for the "After visitors submit this form" field in the form's settings, but it will only show the default message.

Note: In case, you're experiencing a different behavior on your website's form, please share its link so I can troubleshoot it accordingly.

regards,
Waqar

#1145737

Hello

Thank you for your reply
So
When I combine AJAX and "Keep displaying the form" it works OK
But
If I set AJAX and "Display the message instead of the form the WHOLE page is reloaded, which is not OK
you could try
1. AJAX and keep the form
hidden link

2.AJAX and display message
hidden link

Hopefully russian will not confuse you

#1145837

Hi,

Thanks for sharing the links to your forms.

I've discussed this with the team and currently the way "Display a message instead of the form..." option works, it redirects/reloads the page to show the set message and I'm afraid, this can't be avoided.

The only option that doesn't reload the page, is "Keep displaying the form", as you noted.

Note: you're welcome to submit this feature as a feature request at:
https://toolset.com/forums/forum/professional-support/#feature-request

regards,
Waqar