Skip Navigation

[Resolved] Submit other form using Jquery

This support ticket is created 7 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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 10:00 - - - - -
- - - - - - -

Supporter timezone: Africa/Cairo (GMT+02:00)

This topic contains 3 replies, has 2 voices.

Last updated by Mohammed 7 years ago.

Assisted by: Mohammed.

Author
Posts
#599198

Hi!

I'm trying to trigger two forms filtered by URL_PARAM.

I want to change some filter option and refresh both form results with ajax.

I'm trying to do it with Jquery, but can't find the specific trigger that update form results.

Thanks!

#599310

Hello Joao,

I’m Mohammed: the Toolset support team leader. I’ll give my best to help you.

I'm afraid I didn't understand your request.

``I want to change some filter option and refresh both form results with ajax.``
I think that this should be done using the available options in the View.
You can add a Query filter which will be reflected on the filters added to the View.

I mean, edit your View > in the ( Query Filter ) section, you will be able to make the view to be filtered before loading the page.

This will be reflected on the filters you add in the (Filter Editor) section.

Please give this a try.

About the form submission. I think that you can use the jquery submit function to force the form to be submitted but I think that this will be useless in case that the previous solution worked with you.

Please let me know if I misunderstood you and clarify your requirements so that I can offer the best help I can.

Thanks.

#599386

Hi Mohammed! Thanks for your help!

What I want to do is different. I have two different views in one page. Both has filters AJAX triggered.

I want to change some select value in one view filter and "refresh" the other view too. Both with AJAX.

So $(selector).submit(); don't work for me, cause the page is refreshed.

I'm thinking about $(selector).trigger(event); but don't know how event I must call for this work.

Can you help me? Or give some ideias how can I do that. Thanks!

#599857

Hello Joao,

AFAIK the page shouldn't refresh if you triggered the submit event on the forms if they are configured to be AJAX updated unless there is a JS error that causes the forms to behave abnormally.

I'm curious to check the page and views myself to see if I can offer help.

Can you please provide me the access credentials of your website admin dashboard to let me check the issue on your website?

Note: It's preferred to provide these access credentials for a test website.

I will set the next reply as a private one so that you can provide this information securely.

Thanks.