Open bootstrap form dynamically in modal.
I have three workers and want to be able to click on a button for that woker and have a form popup with that worker as the default. I'm trying to do it with ajax using the following code in my functions.php file:
add_action('wp_ajax_appointment_shortcode', 'appointment_shortcode');
add_action('wp_ajax_nopriv_appointment_shortcode', 'appointment_shortcode');
function appointment_shortcode()
{
echo '<div class="appointment-modal">';
echo do_shortcode('[ea_bootstrap layout_cols="2"]');
echo '</div>';
wp_die();
}
This just returns the shortcode text, not the form. Why would that be? I've tested other shortcodes and they work just fine.
Thanks.
Code isn’t formatting right in these comments. Here’s a screen shot of the code:
http://199.167.254.140/wp-content/themes/sublux/Screen%20Shot%202020-11-16%20at%2010.15.09%20AM.png