How to disable and enable form fields in php?

I do not quite understand your requirement here. to disable a form element, you just need to change its disabled attribute to false.


if(some_event_occurred){
    document.formname.element.disable = false; // or true if you want to enable the element.
}

Double posts with two different questions :slight_smile: