Upvoting because this is my most used case. I would like to clean up my existing snippets and avoid having multiple if statements.
This is an example of what I'm trying to achieve but spans across several snippets and imported-snippets:
{note}{formmenu: default=Option 1; Option 2; Option 3; name=choices}{endnote}
{mapping=["Option 1":{import:/snippet1},"Option 2":{import:/snippet2},"Option 3":{import:/snippet3}]}
{output=mapping[choices]}
{=output}
Snippet1:
Invoice Number: {formtext: name=invNum}
Product Code: {formtext: name=itemNum}
Freight Handling Code: {formtext: name=FH Code}
Total Credit: {formtext: name=credAmount}
Quantity Received Damaged: {formtext: name=Qty Damaged}
Lot Number Damaged: {formtext: name=Lot # Damaged}
Signed POD Available: {formtext: name=Y/N (Attach to email)}
Pictures of Damages Available: {formtext: name=Y/N}
Additional Comments: {formparagraph}