Hello,
I am using the following shortcode which works well for the single post view.. However when using the shortcode in a foreach loop the the lightbox pops up with the form fields. However the form tags are stripped from the dom.
Stripped From Form
FORMTAG>form method=”post” action=”/dashboard/orders/?order_id=17732&_wpnonce=4695a7423a” /form<FORM TAG
The foreach loop is a table list of Woocommerce orders. Each record does have action buttons that redirect to affect the action. I am using the shortcode as a means for the user to make contact with the consumers by clicking on the consumers display name. The shortcode is within td tags. Please note, when I doshortcode without the lightpox the message is sent on redirect after submission. What I need is the message sent via ajax in the lightbox. However the form tags are stripped from the form along with the action a wp_once.
Link
” class=”editor-module-bar-btn btn-solid t-mobile-atag”><i class=”orders-click-arrow”>➦</i> <i class=”fas fa-envelope”></i> <?php esc_html_e( $display_name, ‘loext’ ); ?>
Lightbox
do_shortcode(‘[lightbox id=”‘ . $fep_order_id . ‘” width=”600px” class=”loext-fep-lighbox” padding=”20px”][fep_shortcode_new_message_form to="' . $mail_to_name . '" subject="' . esc_html( 'RE: Order Number', 'loext' ) . ': ' . $fep_order_id . '" heading="' . esc_html( 'TO', 'loext' ) . ': ' . $display_name . '"][/lightbox]’);
Good Day