How to conditionally hide particular plugin settings? This answer has given me most of what I need, but I'd like to hide certain settings based on the status of other settings. CP seems to have nice functionality built in for conditionally hiding/showing parameters. For example, when changing a field from Rich Text to Plain Text, several options disappear.

In this case, only if the preceding checkbox is checked do I want it to give an input field for the category field handle.

Here is my /craft/plugins/calendar37/templates/_settings.html file:

{% import "_includes/forms" as forms %}

{{ forms.checkBox({
        label: "Event Hyperlinking"|t,
        id: 'eventClickDestination',
        name: 'eventClickDestination',
        instructions: "If checked, clicking on an event goes to Category page. Otherwise, unchecked it will go an Entry page"|t,
        value: settings.eventClickDestination,
        errors: settings.getErrors('eventClickDestination')
    })
}}

{{ forms.textField({
        label: "Category Field's Handle"|t,
        id: 'categoryFieldHandle',
        name: 'categoryFieldHandle',
        instructions: ""|t,
        value: settings.categoryFieldHandle,
        errors: settings.getErrors('categoryFieldHandle')
    }) 
}}


Note, I'd like to work out similar functionality with a 3-part radio button, but haven't figured out how to do radio buttons yet.

Thank you!
I'm not sure how to do a 3 way toggle with radio boxes, it might involve writing your own JS... but for the checkbox toggle it's pretty straight forward :)

{{ forms.checkboxField({
    ...
    toggle : 'toggleThis'
}) }}

&lt;div id="toggleThis" {% if settings.eventClickDestination is not defined or not settings.eventClickDestination %} class="hidden"{% endif %}&gt;
  //.. Form input goes in here
&lt;/div&gt;


Craft will then take care of the toggling for you when the box is checked/unchecked