Skip Navigation

[Resolved] Cred form in modal popup

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created 7 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 1 reply, has 2 voices.

Last updated by Beda 7 years, 11 months ago.

Assisted by: Beda.

Author
Posts
#468469

I have this code that shows a button. When clicked on, a bootstrap modal opens with the cred form in it. How do I change this code so that the form is ONLY LOADED in the popup when I click the button? Right now, when I view the page that button is on, I can also see in the html it is loading the form too. It's obviously hidden, but still loading it.

[code]<button type="button" class="button snippets" data-toggle="modal" data-target="#[wpv-post-id]">

[wpv-post-body view_template='None']

<div class="modal fade" id="[wpv-post-id]" role="dialog">

<div class="modal-dialog snippet">
<div class="modal-content">

<div class="modal-body">
[cred_form form="1007" form_name="Edit Snippet"]
</div>

</div>
</div>
</div>[/code]

#468667

That is how modals work.

The HTML is there, it's just not shown because it is only visible in the Modal HTML.

What you could do, but we can not provide support for this since it's not a Toolset feature, is to load the Modal's content with AJAX.

But this is complex, it requires Custom Scripts and we can not help with those.
Also, some features are tricky when used with AJAX (related to CRED Forms).
As example CRED delete Buttons might conflict with AJAX calls.

I would reccomend to keep the native feature of Modals as they come out-of-the-box.

The forum ‘Types Community Support’ is closed to new topics and replies.