Skip Navigation

[Resolved] button and modal window in view loop

This support ticket is created 5 years, 10 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.

Our next available supporter will start replying to tickets in about 1.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 1 reply, has 2 voices.

Last updated by Waqar 5 years, 10 months ago.

Assisted by: Waqar.

Author
Posts
#1184569

Hello there. I am using Avada Theme for a client project and I am having trouble with one feature I need to implement: I am in a CPT view , looping items. Each item has a button with a link which should open a modal window with a form inside. Each form is different, meaning that it is a single form using different parameters linked to the single item. So I would need to have a number of modal windows, I guess. I tried using the avada modal dialog shortcode, which is working only partially: it generates the modals, but only the first one loads the form. The rest are blank. Note that each button loads an individual modal, with a different id and name. Any idea about how this could be accomplished?

#1184880

Hi Gian,

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

Instead of loading multiple instances of the same form (with different parameters) on the same page through modal/popup, I would recommend a different approach which should improve the performance, as well:

1. Please create a new page for your form and make the form accept the parameters through URL.

2. Through the theme's settings on this page's edit screen, you can disable the extra elements like header, footer, page title bar etc, so that only the form is visible on that page.

3. Next, you can show this newly created page in a modal/popup from your CPT View, making sure that correct URL parameter is added to form page's link, for each loop item.

4. In case the Avada theme's modal/popup feature doesn't support loading content from other pages/links, you can use a plugin like "WP Video Lightbox" ( https://wordpress.org/plugins/wp-video-lightbox/ ) or "prettyPhoto" script directly.
( hidden link )

I hope this helps and please let me know how it goes.

regards,
Waqar