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.

Passing Email through Query String Error

  1. Im trying to pass an email through the query string so that another form can dynamically populate the value into its email field. The issue is that the form is passing the email like this:

    email=nameyourdomain.com.

    It seems as if the @ symbol, or the URL encoded version of that, is not being passed. This populates my email field incorrectly without the @ symbol. How would I fix this?

    Posted 12 years ago on Friday September 2, 2011 | Permalink
  2. I was able to send an email in a query string. It was encoded like this:

    http://gravity.chrishajer.com/?email=chris%40rocketgenius.com

    That link doesn't do anything, but the @ symbol was properly URL encoded as %40. Do you have an example of where this is happening to you?

    Posted 12 years ago on Saturday September 3, 2011 | Permalink
  3. Yes, I have an example.

    http://nsdstudio.com/small-business-web-design

    Submit the form on the right side and you will see.

    Thanks for looking at this for me.

    Posted 12 years ago on Saturday September 3, 2011 | Permalink
  4. I see it:
    http://nsdstudio.com/evaluation-form?fname=Chris&lname=Hajer&email=chrisrocketgenius.com

    Very odd. I wonder if it has something to do with the server configuration or mod_security or something?

    I noticed this happen on another site I happened to be submitting a Gravity Form on, earlier today, and it caught me off guard. It looks like the issue is the same, but I'm unable to duplicate the problem on any of the servers I have.

    Posted 12 years ago on Sunday September 4, 2011 | Permalink
  5. I saw the initial form get sent through to my email but as you can see, the email doesn't get populated correctly into the email text box on the next page. Would you suggest another method of doing the same thing without using the query string?

    Posted 12 years ago on Sunday September 4, 2011 | Permalink
  6. I did see that the email field was not populated correctly. What you're trying to do should be possible so I'd like to figure out why it's not working. It works in some cases.

    Can you post everything from the textarea where your query string was built? The whole thing? Wrap it in backticks (just above the tab key, below the ESC key on most keyboards) so the formatting does not get messed up.

    Posted 12 years ago on Sunday September 4, 2011 | Permalink
  7. How about if you add a slash after the URL? So this:
    http://nsdstudio.com/evaluation-form/

    Instead of this:
    http://nsdstudio.com/evaluation-form

    for your URL. Does that change anything?

    Posted 12 years ago on Sunday September 4, 2011 | Permalink
  8. fname={First Name:1}&lname={Last Name:3}&email={Email:2}

    Posted 12 years ago on Sunday September 4, 2011 | Permalink
  9. The query string looks fine. Can you try the slash at the end of the URL and see if that changes anything?

    Posted 12 years ago on Sunday September 4, 2011 | Permalink
  10. tried the slash

    This is what I have now:

    http://www.nsdstudio.com/Evaluation-Form/

    fname={First Name:1}&lname={Last Name:3}&email={Email:2}

    didnt work :(

    Posted 12 years ago on Sunday September 4, 2011 | Permalink
  11. No, in the box above. The URL before the query string. Try adding a slash to the end of the URL. I don't think it will work but I am curious if it makes a difference.

    Also, what are your permalink settings? My permalink settings:

    /%year%/%monthnum%/%day%/%postname%/

    Notice the difference between this and this on my server:
    http://gravity.chrishajer.com/contact-us/
    http://gravity.chrishajer.com/contact-us

    The one without a slash will redirect to the one with a trailing slash.

    Check the URL on your server:
    http://nsdstudio.com/evaluation-form/
    http://nsdstudio.com/evaluation-form

    The opposite happens. The one with a slash redirects to the one without. Interesting.

    Posted 12 years ago on Sunday September 4, 2011 | Permalink
  12. PermaLink setting is /%postname%

    Posted 12 years ago on Sunday September 4, 2011 | Permalink
  13. There was another post here recently about the @ being stripped from the query string. I am going to try to find it and see if there was a difference with the permalink settings there too. At least to check for differences.

    Posted 12 years ago on Sunday September 4, 2011 | Permalink
  14. I read that one too but it seems he figured it out on his apache server but he didnt share what the solution was.

    Posted 12 years ago on Sunday September 4, 2011 | Permalink
  15. Do you have a link to that one? It sounds different than the one I was referring to.

    Posted 12 years ago on Sunday September 4, 2011 | Permalink
  16. Thanks for that URL. That is not the one I recall but it is the same problem and probably related.

    Do you have access to Apache logs to see if the URL is being redirected for these requests? I suspect it's got something to do with permalinks and mod_rewrite and the URL with/without the trailing slash. It's as the poster mentioned in the thread you linked to: the initial query string was OK but after rewriting, something (the @) was lost.

    Posted 12 years ago on Sunday September 4, 2011 | Permalink
  17. I do not have access to the apache logs. Drats....

    Posted 12 years ago on Sunday September 4, 2011 | Permalink
  18. OK, hang tight. We'll come up with something.

    Posted 12 years ago on Sunday September 4, 2011 | Permalink
  19. Thank you, appreciate the support :)

    Posted 12 years ago on Sunday September 4, 2011 | Permalink
  20. It looks like you changed the permalink settings? I am seeing a trailing slash now ...

    Also, if you manually populate the query string with the email address with an @ in it, it fills in the form fine.

    http://nsdstudio.com/evaluation-form/?fname=Chris2&lname=Hajer2&email=Chris@rocketgenius.com

    In the entry from the first (sidebar) form, is the email address stored correctly? If so, we know the entry is correct in the first form. We know the second form can process the query string with the @ when it's sent. So something in between is stripping out the @ on your server.

    Posted 12 years ago on Sunday September 4, 2011 | Permalink
  21. Its being stored correctly. I put a notification on the initial form (First, last , and email form) and it emails me the correct email with all proper characters.

    Posted 12 years ago on Sunday September 4, 2011 | Permalink
  22. Do you have the URL in the redirect capitalized like this:
    http://www.nsdstudio.com/Evaluation-Form/

    It should be lower case, like this:
    http://www.nsdstudio.com/evaluation-form/

    That will cause a 301 redirect and I think that's when you lose the @.

    Posted 12 years ago on Sunday September 4, 2011 | Permalink
  23. Hmmmm.....That worked....but.....so......angry.....now......3.......days......spent.. .....stupid......capitial......letters!!!!!

    Thanks bud!

    Posted 12 years ago on Sunday September 4, 2011 | Permalink
  24. I'm glad that's resolved. Enjoy the holiday weekend!

    Posted 12 years ago on Sunday September 4, 2011 | Permalink
  25. You too bud! Thanks for the help!

    Posted 12 years ago on Sunday September 4, 2011 | Permalink
  26. You're welcome.

    Posted 12 years ago on Sunday September 4, 2011 | Permalink

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