0

I'm trying to get the answers from one form, pre-filled in another form by adding tokens in the confirmation URL. This works for most answers while using the token: [webform_submission:values:?]

However one of the answers I need to pre-fill is based on a content type (Entity select question), instead of sending just the node number of the content type, it sends 'node 101' (node%3A101) in the URL. I need the 'node%3A' part to disappear in order for the pre-fill to work.

This is how my confirmation URL looks like: /thank-you/?destination=[webform_submission:values:destination:raw]&e_mail=[webform_submission:values:e_mail]

The e-mail token works, the destination token not. If I leave the raw part out it will send both the destination name and the node in the URL, you will then get something like this: Sri%20Lanka%20%28101%29. The node of this content type (Sri Lanka) is 101.

1

You need to add the :urlencode suffix and change [webform_submission:values:e_mail] to [webform_submission:values:e_mail:urlencode]

1
  • It is the destination that is the problem (not the email). So this part [webform_submission:values:destination:raw] gets me this URL: ....?bestemming=Sri Lanka (101)&... while it should become just ....?bestemming=101&... The weird thing is if I check the logs what is posted is actually 101, however what it gets is Sri Lanka (101). I'm now wondering if this is a webforms problem, or that I have some general settings that cause this to happen. – Dianthe Jul 15 '20 at 14:52

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.