Configuration Page, Interactive Disable/Enable?

I’m trying to build something on my settings page similar to the Redudancy/Network Settings category.

I can set the enabled/disabled status of my text field (to test I’ve been using a validator), but how can I make it real-time interactive?

Here’s what I’ve got at the moment:

    public static final BooleanField UseDefaultDataPath = new BooleanField(META, "usedefault_data_path")
    public static final StringField DataPath = new StringField(META, "data_path")

    static {
        UseDefaultDataPath.addValidator(new SValidatorI() {
            public void onValidate(SFieldMeta sFieldMeta, SRecordInstance sRecordInstance) throws SException.Validation {
                if (sRecordInstance.getBoolean(UseDefaultDataPath))  {
                } else {