2

I'm trying to get a member's email address to autopopulate a form field but if I use {email} then the output is the Javascript encoded "safe" email address. Obviously I dont want this, I just want the email address itself.

How can I turn off the encoding - ideally in just this instance?

This site is running EE 2.4 and I can't update it for the moment. Seems odd that the member email is being encoded. It's not coming from a channel entry so I can't simply turn off the encoding option in channel prefs and I'm not using the {encode} tag.

3
  • 1
    Is the {email} tag wrapped with any plugin/module tags that could be altering EE's usual parsing behaviour? Depending on the context you might want to try the {logged_in_email} variable as that's less likely to be impacted by any other modules you're using.
    – Dom Stubbs
    Dec 13 '12 at 19:05
  • It is within another tag but the behaviour is the same when outside the tag pair too. Your suggestion of logged_in_email worked a treat though, if you'd care to add that as an answer I'll accept it so you get the rep. Thank you!
    – foamcow
    Dec 13 '12 at 19:09
  • No worries. The logged_in_x vars are always worth a shot if something isn't working as you'd expect it to.
    – Dom Stubbs
    Dec 13 '12 at 19:13
3

Depending on the context you might want to try the {logged_in_email} variable as that's less likely to be impacted by any other modules you're using.

Reposted as an answer rather than a comment as it seems to have worked.

1
  • {logged_in_email} worked for me for outputting the raw email address within {exp:member:custom_profile_data}
    – Kokako
    Feb 14 '18 at 1:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.