Forum
Adding custom classes in backend
Hello Perch,
Is there a way to add classes to perch content in templates so that the field in the backend displays a custom class?
I'm just thinking from a UI perspective, if I have a checkbox called 'is_button' and a subsequent field called 'link_destination', but I only want 'link_destination' to appear if the user checks 'is_button', I'd like to add a class to the field so I can perform the necessary javascript on it.
Is there a way to do this?
There's not, no.
Hehe. Thanks for the straight answer :/
I guessed there wouldnt be a default solution. Other CMS' I use that have things like form builders allow you to add classes to form elements so that in scenarios where some information isn't required unless an option is selected, I can add custom CSS and Javascript to show/hide those elements in the backend.
You can add your own CSS and JavaScript, but not modify the HTML.