Answered

Skipping email entry if it has been passed as a hidden field

  • 16 February 2024
  • 6 replies
  • 38 views

Userlevel 1

Hi

I would like to be able to pass in the email address to my form as a hidden field and skip the enter email step if it has been set.

I got that working by checking whether the hidden field contains an “@” and skipping the enter email stage if it does..

Great but that means sometimes the valid email address is the variable@email and other times it’s in the hidden field 

My question is can the @email variable be set from the hidden field (or visa versa) so I have the variable set in the same place whether the email has been passed in or not.

I thought about setting up a custom variable to be set from both situations but custom variables can’t contain an @ and therefore can’t contain an email address.

What do other people do in this situation? I guess it’s a fairly common issue?

Any advice appreciated

Thanks

icon

Best answer by john.desborough 16 February 2024, 18:52

View original

6 replies

Userlevel 7
Badge +5

Hi @OrrDee This is a great question! Your current setup is the best solution we have at the moment since it’s not possible to pre-fill an answer to a question - the email field, in this case. I can share this feedback with the product team though. 😀

Userlevel 1

Thanks for the quick reply @Liz 

Maybe allowing the @ character in custom variables would be best? 

Then we could create a custom variable for an email and set it and use it from both form entry and hidden fields.

Cheers

Orr

Userlevel 7
Badge +6

@OrrDee - one thing to note.. that if you have an email for a user in your system that you CAN add to the url, but not for some others, you COULD have a dummy text string like “email=xxxxx’  - the xxxxx being the indicator for a blank email (this is also how a typeform creates the default share url when you have a hidden field called email)

if you do that, you can have the logic rules look for the email=xxxxx string and have the add an email address question presented. 

just a thought .. @Liz 

Userlevel 1

I see what you mean @john.desborough.

I can do something like this

 

This way I’ll know which variable has the correct value.

That’s a great idea huge thanks!

Userlevel 7
Badge +6

@OrrDee - careful on your logic - that seems to say if the email contains xxxxx AND contains the @ ..i think you don’t want both of those to be TRUE to get to the phone number .. 

maybe ‘is not equal to xxxxx’ AND contains @ would be a better fit to go to phone number 

 

just sayin’

Userlevel 1

Ha ha yes that’s right thanks @john.desborough 

Reply