We have an iframe form setup on a landing page with both English and French language preferences. I want to get the URL parameter that shows Language type and write that value to a Data Extension upon form submission.

Can the above be done using SSJS? Is jQuery a better option than Ampscript to do it?

2 Answers 2


Just answering my own question :)

I solved it by passing an Ampscript variable, setting it up as a hidden field on form submit, and calling it during Post passing the subscriber's language to the data extension.

Something like this:

Sign-up page:


set @formlang = "en-CA" 
set @formlang = "fr-CA"


<input type="hidden" name="formlang" id="formlang" value="%%=v(@formlang)=%%"/>

Confirmation page - on POST


set @formlang = RequestParameter("formlang");   
UpsertData ('lang', @formlang)

if you have an alternative to the above, share it here - thanks!


In your example, the language it's going to be always "fr-CA" as you are overwritting the @formlang variable (remember the code iscompiled top-down).

If you want the user to choose the language, insert a select option instead of the hidden. If you want to autoselect the preferenced language for the user, first retrieve the language value from the data extension: a) and update the option with the selected attribute. (to allow the user to modifiy the value) b) print the value in your hidden field %%v=()=%%

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.