Skip Navigation

[Resolved] insert CRED form on popup window

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

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 3 replies, has 3 voices.

Last updated by Christian Cox 5 years, 10 months ago.

Assisted by: Christian Cox.

Author
Posts
#824506
2018-03-01_14-44-50.png

Hello dear support community!

Tell us what you are trying to do?
I have search form (3rd party) inserted on my site - link is here hidden link
I've also created Toolset post form ID951 "a31-multitour-trip_request" (right now it is located on right part of screen, but I made it only for example).

If you click at any line item basket on left search form - there is blank popup appears. My idea - is to put Toolset post form ID951 on that popup. Can you please point a way how to do it?

a code from 3rd party php goes here, as far as I understand I need to put a link to php or js file with a page of Toolset?
[code]
<?php
$selector = ( int ) isset( $_GET[ 'selector' ] ) ? $_GET[ 'selector' ] : null;
$selector = $selector ? $selector : '';
?>
<!DOCTYPE html>
<html>
<head><META http-equiv="Content-Type" CONTENT="text/html; charset=UTF-8">
<META NAME="description" CONTENT="">
<META NAME="keywords" CONTENT="">
<title></title>
</head>
<body>
<!-- начало кода -->
<div id="multitour_content" style="min-width:550px;width:100%;min-height:125vh;height:auto%">
<script type="text/javascript">
var mailsend = “hidden link NEED INSERT TOOLSET POST FORM ID951 HERE]”;
</script>
<script type="text/javascript" src="hidden link"></script>
<script type="text/javascript">selector();</script>
</div>
</body>
</html>
[/code]

#825079

You mean, that you want to put a Toolset Form (Former Toolset CRED) into that Pop Up that appears when you click on some of those links in the table?

That can be possible, but you need to put the Toolset ShortCode for the Form in an editor that can expand it, such as a Content Template for example.

The third-party code you share doesn't really tell much about how the WordPress query is made and how data is collected and presented, and it's not subject to support analysing that.

But you could create such a table with Toolset Views and insert the Form ShortCode in a Bootstrap 3 Modal, for example, which appears once you click a certain link or button.

This is perfectly possible with Toolset alone, but if you require displaying CRED forms in other outputs, this is not a problem.
It just needs to either an editor that somehow can expand the ShortCode and you can call in a modal, or you call the form with PHP, but then you need to observe this issue here:
https://toolset.com/errata/unexpected-input-when-shortcode-with-id-attribute-is-rendered-using-php/
In Toolset Forms, this above Errata translates to:
- In a CRED Form holding a [wpv-post-title id='$parent_post_type_slug']") ShortCode, rendered via PHP (echo (do_shortcode("[cred_form form='YOUR-FORM-ID']")); ), this shortcode fails to load the correct parent.

Of course, that is an exception that does only happen if you plan to work with attributes in shortcodes like above shown.

Generally, it's not recommended to output Toolset Forms via PHP.

Hence you would be left with inserting the Shortcode in some HTML editor, for example, a Content Template, or Post Body, or where your 3rd Party Plugin builds the HTML output.

However, we cannot assist the 3rd Party Plugin.

The authors of the Plugin, however, can always join the "Beyond Pages" Programme, which allows integrating Plugins and Themes with Toolset:
https://toolset.com/documentation/beyond-pages-program/

Or, if you find compatibility issues between Toolset and that plugin we are always ready to help solving those together with the authors of the 3rd party Software.

#825217

aaa, ok

is it possible to fill toolset form located on page hidden link (right part of screen) with js event when user click on basket in search form in left part of screen (values should be sent from fields as shown on screenshot attached earlier ?

#834002

That type of interaction would require custom code, which falls outside the scope of support we provide here in the forums. CRED does not currently have a JavaScript API, so manipulating the form field values after the page loads will require your own custom JavaScript.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.