mercredi 22 avril 2020

Conditional display of elements, but two-step html code creation

Background: I want to create a template for web articles for various authors to use in an online content management portal (based on Liveray). I want the authors to be able to select/ set some checkboxes, but when published, these checkboxes should be disabled, i.e. readers should only see the values but not be able to change the checks anymore.

What I have done/ understood so far: Thanks to some threads here I know how to disable the checkboxes based on the value of another checkbox. So what I thought to do is to have two divs, one with the checkboxes I need displayed (ids value1, value2, ...), one with the trigger checkbox (id="final") which I show to the authors (unchecked) but once checked, "disappears" >> so I guess I want to disable the div based on a checkbox value contained in itself?!

Challenge: Disabling the valueX checkboxes works fine, but I want to then not display the div with the trigger checkbox at all once it is checked.




Aucun commentaire:

Enregistrer un commentaire