Home › Forums › Quform WordPress › JS code after successful submission of a form
- This topic has 9 replies, 2 voices, and was last updated 10 months, 3 weeks ago by Ally.
- AuthorPosts
- December 15, 2023 at 11:04 pm #36343vsexmogushiyParticipant
Good day!
I need to run JS code after successful submission of a form.
One code for any form, and several different ones for forms with different IDs.Could you please tell me which hook I can use to do this ( a link to the documentation section will be enough).
(I need use Yandex Metrica)
December 16, 2023 at 9:57 am #36344AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
December 19, 2023 at 10:54 pm #36350vsexmogushiyParticipantMany Thanks, it works!
Please tell me 2 more questions:
1. How I can fixe this problem (screenshot)?
2. Which caching plugin can use it with a QForm?Attachments:
You must be logged in to view attached files.December 21, 2023 at 10:38 am #36352AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
December 26, 2023 at 11:04 pm #36354vsexmogushiyParticipantThanks a lot for the answer, but the problem just occurred when caching was enabled. The Hyper X plugin is used, and the problem is that when sending invisible fields, they are cached (ip address, time of sending, user agent, and others). Invisible fields get into the cache and remain there, however, in the CMS, the data in the additional information block is filled in correctly. In more detail in the screenshots, tell me how to make invisible fields not fall into the cache?
Attachments:
You must be logged in to view attached files.December 28, 2023 at 12:09 pm #36363AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
December 28, 2023 at 5:34 pm #36366vsexmogushiyParticipantThe forms are located on all pages of the site (header, footer, body several times). If it is possible to make a JS code, this is bad news, PHP, as I understand it, will load a lot. Therefore, yes, of course we need at least some kind of option, the most productive and optimal.
December 29, 2023 at 12:45 pm #36371AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
December 30, 2023 at 8:26 pm #36372vsexmogushiyParticipantThank you very much, if I understand correctly, you also need to change:
replaceVariables('{ip}')
to:
replaceVariables('{uniqid}')
for install unique ID?But what to do for a dynamic value? More detailed settings are in the screenshot.
- This reply was modified 10 months, 4 weeks ago by vsexmogushiy. Reason: code
Attachments:
You must be logged in to view attached files.January 3, 2024 at 8:33 am #36379AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
- AuthorPosts
- You must be logged in to reply to this topic.