[Fixed]-Enable disable a textfield on the selection of dropdown value in Django

1👍

You should use JQuery or JavaScript. define a method in javascript and associate it with onChange event of dropdown field.

$('[name="institution"]').change(function () {
    var end = this.value;
    if (end == 'Other'){
        $('[name="otherInstitute"]').show();
    }
    else {
        $('[name="otherInstitute"]').hide();
    }
}

Leave a comment