form['field_name']['#disabled'] = TRUE; 但我必须使用
When you want to hook into a CCK form and alter something, you are usually required to call a custom function from
When doing so, I have noticed I can't write $
form['field_name']['#disabled'] = TRUE; but instead I have to use the
Why? Am I doing something wrong?
The form API is usually doing that for you, but it probably does that before calling the after_build functions.
The #after_build functions are called in form_builder(), #disabled handling is in _form_builder_handle_input_element(), which is called earlier in form_builder().