I have a numeric field (
max_count__c) which is retrieved from sales cloud. This field can range from value 1 to 5.
In cloudpage, my landing page is supposed to display a dynamic dropdown list based on the value entered in
max_count__c in Sales cloud.
max_count__c is 3 in sales cloud, my dropdown list in my html form should be showing a dropdown list of 3 values (1, 2 and 3). A sample of my code is as follows:
<html lang="en"> <head> </head> <body> %%[ var @scintfields, @maxcount set @scintfields= RetrieveSalesforceObjects('Campaign', 'max_count__c', 'Id', '=', @campaignid) Set @maxcount = FormatNumber(FIELD(ROW(@scintfields,1), 'max_count__c'),"F0") ]%% <form action="%%=v(@deflandingpage)=%%" method="post"> <!--note this dropdown section should be dynamic instead of being hard-coded to have 3 options --> <select name="maxcount"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> </select> <br> <input id="submitted" type="hidden" name="submitted" value="submitted" /> <input type="hidden" name="submit" value="1" /> <input type ="submit" value="Submit"> </form> <body> </html>