Open edwardhorsford opened 5 years ago
As @edwardhorsford mentions I raised the question of a flag to set a row as true or not. This is because I have a prototype which based on a radio button selection, certain rows should be shown.
I've encountered #1494 as well.
Contact type = GMS/PMS/other means the dates are optional, and most practices won't include them. But if they are there they are mandated (by NHS Improvement and NHS England) as being shown as optional
Contact type = AMPS means the dates are mandatory and should be included underneath the contact type
When items should not be displayed, items in the main list are hidden:
When items should be displayed (AMPS = true), the items are shown underneath contract type:
Use a radio button value to display rows in a summary list if they are true or not
What
I've frequently wanted to conditionally show or hide a single item in an array used the macros - such as the summary list or radios. At the moment this is rather awkward to do - but could be much simpler, especially for prototyping.
You can almost achieve this by adding logic at the end of the item, like so:
However, because of #1494 it doesn't work. Even if it did, it might not be so obvious.
@GrilloPress suggested a flag on the item might work:
My use case:
I have a page of radios. When the user first runs through it, it has one less option than when they run through again (and have the option of removing). The page is the same - I want to be able to conditionally show the last option based on data.
First time:
Second time:
If #1494 does get fixed, it does support this sortof - I'm not sure it's obvious / explicit though. Would be good to see if this is an issue others have come across.