Working on a custom plugin that based on location preferences the user inputs then various dialog messages will be displayed. These messages are returned with an AJAX call. One of the response messages has the Amelia Booking shortcode in it (and I properly execute 'do_shortcode'). I see the Amelia DOM structure but the nothing is visible. Is there anything else I have to do for this type of dynamic insertion?
Sorry but I did not quite understand what are you trying to achieve, can you please describe me more or send me some example/screenshot so I can take a look and give you my suggestion.
I have a custom form on a page where a user selects a service type and zip code. When they press submit a call is made to a WordPress API endpoint to check and see if the requested service is available in that zip code. The API returns some JSON that among other things contains the appropriate message if the service is provided in their area or not.
In the case that the service is available then the return message in JSON comes from a WP WYSIWYG editor that includes the Amelia booking shortcode. Before I return the JSON I retrieve the contents of that WYSIWYG editor and use do_shortcode() on it so that any embedded shortcodes will be properly executed.
When that API JSON data is received the JS on the page puts the results message content into a div viewable on the page. I should be seeing my message plus the Amelia date selection interface. If I look at the web console I do see HTML for it, but the date selector is not visible. Wasn't sure if there was some page load events or something that it was depending on being fired before the plugin populated. Something it would miss if being dynamically added to the DOM.
Attached is a screenshot from the webconsole where you can see the DOM structure.
Thank you for explanation and sorry for late response, we are not working on weekends.
Unfortunately something like this is not possible to achieve with the plugin built in features at the moment and it requires some code customization, which unfortunately is not included in the regular support of the product.
I will try to give you some hints where to look so probably you can find where the issue is.
As I can see you are using the shortcode differently, it looks like your API is returning that shortcode which is generated, and our JS is not rendered in the page header.
Probably in this file src/Infrastructure/WP/ShortcodeService/AmeliaShortcodeService.php you can find a method prepareScriptsAndStyles which is not rendering at all after the API call.
Working on a custom plugin that based on location preferences the user inputs then various dialog messages will be displayed. These messages are returned with an AJAX call. One of the response messages has the Amelia Booking shortcode in it (and I properly execute 'do_shortcode'). I see the Amelia DOM structure but the nothing is visible. Is there anything else I have to do for this type of dynamic insertion?
HI Steve,
Thank you for your purchase.
Sorry but I did not quite understand what are you trying to achieve, can you please describe me more or send me some example/screenshot so I can take a look and give you my suggestion.
Best regards.
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Hello Bogdan!
I have a custom form on a page where a user selects a service type and zip code. When they press submit a call is made to a WordPress API endpoint to check and see if the requested service is available in that zip code. The API returns some JSON that among other things contains the appropriate message if the service is provided in their area or not.
In the case that the service is available then the return message in JSON comes from a WP WYSIWYG editor that includes the Amelia booking shortcode. Before I return the JSON I retrieve the contents of that WYSIWYG editor and use do_shortcode() on it so that any embedded shortcodes will be properly executed.
When that API JSON data is received the JS on the page puts the results message content into a div viewable on the page. I should be seeing my message plus the Amelia date selection interface. If I look at the web console I do see HTML for it, but the date selector is not visible. Wasn't sure if there was some page load events or something that it was depending on being fired before the plugin populated. Something it would miss if being dynamically added to the DOM.
Attached is a screenshot from the webconsole where you can see the DOM structure.
HI Steve,
Thank you for explanation and sorry for late response, we are not working on weekends.
Unfortunately something like this is not possible to achieve with the plugin built in features at the moment and it requires some code customization, which unfortunately is not included in the regular support of the product.
I will try to give you some hints where to look so probably you can find where the issue is.
As I can see you are using the shortcode differently, it looks like your API is returning that shortcode which is generated, and our JS is not rendered in the page header.
Probably in this file src/Infrastructure/WP/ShortcodeService/AmeliaShortcodeService.php you can find a method prepareScriptsAndStyles which is not rendering at all after the API call.
Best regards.
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Understood, thanks!
HI Steve,
You are welcome.
If you have any more questions feel free to open a new ticket, we will gladly help.
Best regards.
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables