Can a divider be told to show initially as collapsed ?
Is there a way to tell a divider (divider-before, divider-after) to initially show as collapsed. So the content in the divider is hidden.
I have written a script to handle this, it is on GitHub:
My use-case is: I want to offer the editor of the content three content fields to fill. There is a heading, a text area and one optional image field.
Because the image field is not often used and takes a lot of space in the interface, I would very much like to hide it, until being used. This makes recognizing the content on the page much easier. I am showing multiple items on an edit page.
- Can the dividers be told to collapse initially?
- Could I program a field type to do this, is this advisable ?
- Am I going at this the wrong way maybe, and is there a better, more Perch like solution?