[Resolved] activate an action when loading a page with form, without submit
This support ticket is created 3 years, 4 months 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.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
Hello and thank you for contacting the Toolset support.
What you are, probably, looking for is the submit function in jQuery. hidden link
If you have only one form inside the page you can use the following code:
// Passing our function to jQuery will execute it when the page loads
jQuery(function(){
// submit the form
jQuery('form').submit()
})
If you may have multiple forms on the page, you will need to scope the jQuery selector. For example, put the form inside a <div> that has the class "my-form" and use the following code:
// Passing our function to jQuery will execute it when the page loads
jQuery(function(){
// submit the form
jQuery('.my-form form').submit()
})
I hope this helps. Let me know if you have any questions.
I'll need to take a closer look at your form and where it is being used to understand why it is not working. If you would agree, your next reply will be private to let you share credentials safely. ** Make a database backup before sharing credentials. **