1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Partial Fix Contact Form

Discussion in 'Resolved Bug Reports' started by xf_phantom, Aug 19, 2013.

  1. xf_phantom

    xf_phantom Well-Known Member

    Aren't the redirect variable and the data-redirect tag (or how would you call this?*g*) missing in the form?

    The controller sets the redirect template parameter, but i had to add it myself to the form and also change

    <form action="{xen:link 'misc/contact'}" method="post" class="xenForm formOverlay AutoValidator">
    <form action="{xen:link 'misc/contact'}" method="post" class="xenForm formOverlay AutoValidator" data-redirect="on">

    to get the redirect working
    Last edited: Aug 19, 2013
    Adam Howard likes this.
  2. sonnb

    sonnb Well-Known Member

    Maybe he does not want to redirect because redirect does nothing in this case?
  3. xf_phantom

    xf_phantom Well-Known Member

    if it's a overlay, it shouldn't redirect, that's true, but if the user doesn't use js, he'll not be redirected to the page he's comming from. He will stick on the contactform after the form was sent (without any notice, the contact page will just reload..)
  4. sonnb

    sonnb Well-Known Member

    Do not worry. If he does not use JS then AutoValidator would not be called anyway :D
  5. xf_phantom

    xf_phantom Well-Known Member

    yes, but because the form doesn't submit the redirect url, the controller will just redirect him back to the contact form

    try it out

    and then add
    <input type="hidden" name="redirect" value="{$redirect}" />
    to the form and try it again:)
  6. sonnb

    sonnb Well-Known Member

    Okie. Then it should be addressed.
  7. Mike

    Mike XenForo Developer Staff Member

    I have added the hidden redirect input, but the lack of data-redirect is correct. The contact form is opened with an overlay by default so it shouldn't redirect.

Share This Page