scriptedforms icon indicating copy to clipboard operation
scriptedforms copied to clipboard

Create a <content-container> which takes a conditional tag

Open SimonBiggs opened this issue 7 years ago • 3 comments

Create a <content-container> which can have a conditional tag which causes the contents of that element to only be displayed if the conditional is met.

SimonBiggs avatar Apr 04 '18 23:04 SimonBiggs

I imagine other features might be to pass variables through to display contents or something of that sort, or even have the contents occur multiple times based off of a for loop through the variables passed to the element.

SimonBiggs avatar Apr 04 '18 23:04 SimonBiggs

Variable passing might work by having a parameter variables which takes a dictionary. The keys of the dictionary can then be used within curly brackets like so:

{{dictionary_key}}

A for loop could work similarly, except pass a list of dictionaries. The contents of the container is repeated for every dictionary in the list. Variables update to be the content of the new dict. ...

SimonBiggs avatar Apr 05 '18 05:04 SimonBiggs

@robmarkcole what did you think about this?

SimonBiggs avatar Apr 05 '18 09:04 SimonBiggs