0

I'm looking to populate a hidden field within my Smart Capture form with a concatenated value. I'm not sure if I'm setting up the Ampscript properly.

I've tried to insert the AMPscript in a standalone HTML content block as well is in the Smart Capture Form itself(I can't seem to add in any code prior to the tag).

I've tried to concat date and email directly in the field (sure my syntax was wrong) as well as setting variables and calling them like below.

How should I set this up and where should I insert my AMPscript?

%%[ 
VAR @email, @date, @uniqueID
SET @email = emailaddr
SET @date = Now(1)
SET @uniqueID = Concat(@email, @date)
]%%

<input name="uniqueID" type="hidden" value="%%=v(@uniqueID)=%%">
1
  • Hi Chris, You can insert ampscript code before the closing form tag in Smart Capture-> HTML Editor. I tried and it worked for me. Also I can see the value in hidden field by inspecting the element in browser. If you can be more specific as what you are looking for, I can surely help. – Nishchal agarwal Mar 12 at 9:38

Your Answer

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

Browse other questions tagged or ask your own question.