Home › Forums › Front End PM PRO › fep_shortcode_new_message_form to
- This topic has 2 replies, 2 voices, and was last updated 2 years, 6 months ago by Shamim Hasan.
- AuthorPosts
- June 3, 2023 at 4:04 am #45496Larry CottleParticipant
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 TAGThe 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.
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
June 3, 2023 at 5:51 am #45499Larry CottleParticipantSo, the foreach loop is in a form. Nested forms are not allowed according to the HTML specification. When a form element is nested within another form element, the browser corrects the structure. As a result the form tags being removed.
Back to the drawing board!!!
Any suggestions to overcome my dilemma are welcomed. Otherwise Please close this ticket.
Thank You! for your time.
Good Day
June 4, 2023 at 11:27 pm #45503Shamim HasanKeymasterYou can use https://sp-test1.arogga.co/docs/front-end-pm/shortcode/fep_shortcode_message_to/ which will redirect to message page with
toandsubjectfield per-populated. - AuthorPosts
You need to purchase ‘Front End PM PRO’ to create topic in this support forum.
If you already purchased ‘Front End PM PRO’ please LOGIN.