PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Email:: No Duplicates

  1. Instead of a error message when a duplicate email is submitted. how can I just redirect to a webpage?

    Posted 11 years ago on Wednesday December 26, 2012 | Permalink
  2. Instead of a validation error being returned, do you want to just redirect to a web page, or, when a duplicate email address is entered, should the form submission go through, but after submission land those people on a web page?

    Do you have a link to your form online now? When is the email address collected? Is this a single or multi-page form?

    Posted 11 years ago on Wednesday December 26, 2012 | Permalink
  3. form is located at: http://50.116.122.182/~outsidea/
    If a duplicate email is submitted, I don't want the form submission to go through, I just want them redirected to a web page.

    Posted 11 years ago on Wednesday December 26, 2012 | Permalink
  4. So, the sidebar form, if someone submits an email address which was previously submitted, just redirect them to a web page? If you can confirm that, we can find a solution for you.

    Posted 11 years ago on Wednesday December 26, 2012 | Permalink
  5. yes, that is correct.

    Posted 11 years ago on Wednesday December 26, 2012 | Permalink
  6. I would check the box "No Duplicates" for the field so that when there is an email address entered which was previously submitted, you can then hijack the duplicate message and return a redirect header instead. You can use the gform_duplicate_message filter: http://www.gravityhelp.com/documentation/page/Gform_duplicate_message

    Take a look at this code: http://pastebin.com/p8RfzU4B

    That code will apply to form 21, if there are any duplicate field values entered. In your sidebar form, mark only the email field "No Duplicates". If your form ID is not 21, change the 21 on line 04 to your form ID. Change the URL on lines 06 and 07 to the URL you want to direct the visitor to.

    No entry will be created because the form submission will not be successful.

    I have no duplicates checked for the email field on this form. http://gravity.chrishajer.com/check-your-ticket-number/ You will need to submit the form twice with the same email to see this in action.

    (the matching ticket number on the form is a different sort of validation. If you do not want a validation error there, you will need to enter the same string in both ticket fields.)

    Let me know if you need more help with that.

    Posted 11 years ago on Wednesday December 26, 2012 | Permalink
  7. I am not clear where to paste the code. Sorry I am not an expert coder.

    Posted 11 years ago on Wednesday December 26, 2012 | Permalink
  8. That code will go in your theme's functions.php. http://www.gravityhelp.com/documentation/page/Where_Do_I_Put_This_Code%3F#PHP

    If you would like to edit it before you paste it, please do that and share the code here or at pastebin.com and we can check it for you. If you are nervous about editing your theme's functions.php file, please send me a WordPress administrator login for your site and I will help you.

    Posted 11 years ago on Wednesday December 26, 2012 | Permalink
  9. I would really appreciate your help!

    Posted 11 years ago on Wednesday December 26, 2012 | Permalink
  10. I edited the login details out, since this is a public forum.

    I tried logging in here: http://50.116.122.182/~outsidea/wp-admin with the details you provided but it did not work. Please send a WordPress administrator login for the site, and the correct URL in case I am trying the wrong site. Thank you.

    email chris@rocketgenius.com

    Posted 11 years ago on Wednesday December 26, 2012 | Permalink
  11. I will email info

    Posted 11 years ago on Wednesday December 26, 2012 | Permalink
  12. Did you receive my email with login info?

    Posted 11 years ago on Thursday December 27, 2012 | Permalink
  13. Don't worry about editing my site. I followed the instructions you provided and it works perfectly! Thanks for your help.

    Posted 11 years ago on Thursday December 27, 2012 | Permalink
  14. Great. Thank you for the update.

    Posted 11 years ago on Thursday December 27, 2012 | Permalink

This topic has been resolved and has been closed to new replies.