email variable in link not working on form confirmation message

By: Shawn Fawcett | Asked: 05/05/2023
ForumsCategory: General questionsemail variable in link not working on form confirmation message
Shawn Fawcett asked 12 months ago

Hi all, 

On a form submission, I have a link in the confirmation message but it breaks after submit.

The code in the confimration is <a href="https://buy.stripe.com/xxx?prefilled_email=[261]">please proceed to the payment page here</a>

This renders the following link: ">please proceed to the payment page here.

[261] is simply the email variable in the form.  

 

What can I do to fix this?

Walter JonesWalter Jones replied 12 months ago

The problem is the form has already been submitted, so if you doing this from the confirmation page, FF doesn't know what [261] is anymore. If you want to do this, I would recommend you build a view that displays on the confirmation page and put the link in the view.

If you set your confirmation to auto redirect to that link you could trying putting that url in the redirect email section but do [261 sanitize_url=1] and see if that makes a difference.

Rob LeVineRob LeVine replied 12 months ago

@Walter Jones - I politely disagree with that (or don't understand what you're saying). I just tried a simple example of a form with an email field and in the confirmation message I put the email address in it just like @Shawn Fawcett shows in his example and it works fine, which is what I'd expect. I think it's more of a formatting problem. @Shawn Fawcett if you want me to look at it on your system you can send me a message.

Shawn Fawcett replied 12 months ago

The variables including [261] were working on the confirmation message. The snitize did the trick! [261 sanitize_url=1]
Thank you both.

Walter JonesWalter Jones replied 12 months ago

Glad you got it working.

Walter JonesWalter Jones replied 12 months ago

Don’t worry Rob I am still better looking even I don’t make sense. 😂

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right