0

I tried to create a cloudpage in html that has a checkbox with three subjects that the customer will mark if has interest.

This is my cloudpage: https://pub.s7.exacttarget.com/u2qn0g1i5kd

I used AttributeValue to prepopulate the fields FirstName, LastName, E-mail and CPF. I have three data extensions named Bike, Car and Bus with these fields above in cloudpage (FirstName, LastName, Email and CPF) and would like that if the customer marks the checkbox with his name his data will go to the respective data extension named. Is it possible?

1

Yes it is possible. You can create if statements in the processing page where to check the checkbox and perform an insert to the respective DE. Assuming you just want to populate the DE with the 4 fields and your DE doesn't have any primary key, here is some AmpScript to get you started please update the code to fit your exact setup.

IF NOT EMPTY(RequestParameter("submitted")) THEN

SET @firstname = RequestParameter("firstname")
SET @lastname = RequestParameter("lastname")
SET @email = RequestParameter("email")
SET @cpf = RequestParameter("CPF")


SET @Bike = RequestParameter("Bike")
SET @Car = RequestParameter("Car")
SET @Bus = RequestParameter("Bus")

IF NOT EMPTY(@BIKE) THEN
InsertData('BIKE_DE','FirstName',@firstname,'LastName',@lastname,'Email',@email,'CPF',@cpf)
ENDIF


IF NOT EMPTY(@Car) THEN
InsertData('CAR_DE','FirstName',@firstname,'LastName',@lastname,'Email',@email,'CPF',@cpf)
ENDIF


IF NOT EMPTY(@Bus) THEN
InsertData('BUS_DE','FirstName',@firstname,'LastName',@lastname,'Email',@email,'CPF',@cpf)
ENDIF


ENDIF 

  • So thanks, @Finan! Solved my question ;I am trying to create a profile center like cloudpage, if you have tips to help me i agree :) – Joao Marano Feb 25 at 18:56
  • Here is an example of a custom profile center using AmpScript. Hope it helps developer.salesforce.com/docs/… – Finan Nazazi Feb 25 at 20:52

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.