Redirected after submit form Formit Modx

203 views Asked by At

I got redirected after I submit the form, and I want to remain on the same page. I am not sure why I got redirected, I am not using &redirectTo for this. I try some things but nothing worked till now.

[[!FormIt?
   &hooks=`spam,email,FormItSaveForm,successMess`
   &formName= `Contact Form`
   &emailTpl=`emailChunkTpl`
   &emailTo=`[email protected]`
]]      
                    <form action="[[~[[*id]]]]" method="post" class="contactForm">
                    <input type="hidden" name="nospam:blank" value="" />

                        <div class="row input-section-child">
                            <div class="col input-contact">
                                <input value="[[!+fi.input-name]]"class="input-name" name="input-name" id="input-name" type="text" placeholder="your name" />
                                <span class="error-message error" > [[!+fi.error.input-name]] </span>
                                <input value="[[!+fi.input-email]]" class="input-email" name="input-email" id="input-email" type="text" placeholder="email address" />
                                <span class="error-message error" >[[!+fi.error.input-email]] </span>
                            </div>
                            <div class="col input-contact-text">
                                <input value="[[!+fi.input-textare]]"class="input-textare" name="input-textare"  id="input-textare" type="textare" placeholder="message" />
                            </div>
                        </div>

                            <div class="row second-row">
                                <div class="col">
                                    <button type="submit" class="send-button">SEND</button>
                                </div>
                                [[+placeholder]]
                            </div>
                        </div>
                    </from>
1

There are 1 answers

0
LIannotti On

As in my answer on your other post, you should remove all the hooks and try one at a time (after you've cleaned up the markup for this form).

And what is successMess? Is that a custom snippet you've made? It's not a Formit hook that I have heard of. If it's your custom snippet you should paste the code into your question so we can see it.