I have an cloud page which include smart capture form, which having a checkbox, email, country and address fields. I am setting variable value to true and false using jQuery if checkbox is true or false. My code is:

var check;
jQuery("input[name='checkin']").change(function() {
    check = true;
    check = true;

Now i want to set the variable value into url. Can someone tell me how to do that so that my submit url will be (abc.com/?url=check) or with AmpScript variable (abc.com/?url=%%=v(@check)=%%)

Basically i want to run another code based on the value of by checkbox on the page that shows up after submitting the form.


1 Answer 1


You can get checkbox value by alternate way that is, Instead of passing variable value pass the data extension name in the URL. Then read the data extension name as parameter then lookup for checkbox value on your submit page. I am assuming your checkbox type is boolean so the code will be

set @Email = email to match for checkbox value true or false 

set @DE= RequestParameter('Your Data Extenion Name Passed as parameter')

set @value = Lookup(@DE, "checkbox field name", "email", @Email)

IF @value == True THEN

   Your Code If True

ELSEIF @opt == False THEN

    Your Code If False

  • Thanks for this!
    – Ashu
    Sep 17, 2019 at 13:54

You must log in to answer this question.

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