Hi team!
Is there a way to dynamically populate a varying number of variables into a sentence? I have an example snippet below with the desired outputs. The main trouble I'm running into is letting Textblaze know when to include and/commas based on the number of variables.
Shopping List: {formtext: name=Shopping List}
Ingredients
Apple: {formtoggle: name=Apple; default=no}{endformtoggle}
Orange: {formtoggle: name=Orange; default=no}{endformtoggle}
Lemon: {formtoggle: name=Lemon; default=no}{endformtoggle}
Define Shopping List
{if: `Shopping List`=="1"}{elseif: `Shopping List`=="2"}{Apple="Yes"}{elseif: `Shopping List`=="3"}{Apple="Yes"}{Orange="Yes"}{elseif: `Shopping List`=="4"}{Apple="Yes"}{Lemon="Yes"}{elseif: `Shopping List`=="5"}{Apple="Yes"}{Lemon="Yes"}{Orange="Yes"}{endif}
Desired Outputs
Shopping list 1= ""
Shopping list 2= Apple
Shopping list 3= Apple and Orange
Shopping list 4=Apple and Lemon
Shopping list 5=Apple, Lemon, and Orange