3. Form - Richard98PL/SFMC-Profile-Subscription-Center GitHub Wiki
-
Form Tag
<form method="POST" action="%%=Concat(RedirectTo(@ProfileCenterPageURL),'?email=',RequestParameter('email'))=%%">
-
Form Text Field
<input name="first_name" required type="text" value="<ctrl:var name=firstName default=0/>">
-
Form Select Field
<select name="country"> %%[ SET @country= "" ]%% <script type="text/javascript" runat="server"> Variable.SetValue("@country",js_country) </script> <option value="Poland" %%=IIF(@country=='Poland','selected','')=%%>Poland</option> <option value="Germany" %%=IIF(@country=='Germany','selected','')=%%>Germany</option> <option value="Russia" %%=IIF(@country=='Russia','selected','')=%%>Russia</option> </select>
-
Form Checkbox Field
<input id="all_subscribers" name="all_subscribers" type="checkbox" <ctrl:var name=allSubscribersCheckbox/> >
//<ctrl:var> tag set to "checked" or null