1

I would like to request assistance on how I can concat the values on the smart capture going to the URL after submitting the form.

Here is my ampscript on the cloud page:

%%[
Var @EMAIL, @NAME, @MOBILE, @LINK
Set @EMAIL= RequestParameter ('EMAIL')
Set @NAME= RequestParameter ('NAME')
Set @MOBILE= RequestParameter ('MOBILE')

Set @LINK = Concat('&EMAIL=', @EMAIL, '&NAME=', @NAME, '&MOBILE=', @MOBILE)
]%%

Submit link: https://cloud.mkt.yes.com.ph/test0423?%%=v(@LINK)=%%

Here is the image of my form:
enter image description here

enter image description here

After filling up the form and submitting, the URL result is this:
https://cloud.mkt.yes.com.ph/test0423?&EMAIL=&NAME=&MOBILE=

My expected result should be like this but not happening:
https://cloud.mkt.yes.com.ph/test0423?&[email protected]&NAME=Harvey&MOBILE=09493439188

Let me know what is the issue on my code
Thanks

1 Answer 1

2

Your AMPscript variables @EMAIL, @NAME, and @MOBILE are empty. That is why you end up with only parameter names but no values in the submission link. Unfortunately, you cannot capture input values with AMPscript since it is a server-side language that is executed once per page load.

To achieve what you want you need either to configure a form handler or pick values via front-end with JS, for example. Then you might also want to get rid of the Smart Capture form and configure a custom form on Landing Page.

The small thing on top, once you would fix capturing values from input and correctly appending values to the link, you would also need to remove the ampersand (&) symbol before the first parameter because it should start right after the question mark, like that https://cloud.mkt.yes.com.ph/[email protected]&NAME=Harvey

2
  • Thanks @niko for introducing to me the form handler. I copied the simple code on the site you provide and it worked. I will try to play and design the form to have a better user interface.
    – Harvey
    Commented Jan 4, 2022 at 1:36
  • @Harvey, glad to hear that it worked! FYI you can accept answers that solved your question by clicking on checkmark :)
    – Niko
    Commented Jan 4, 2022 at 8:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .