I want to configure a node form in that after filling a filed and saving,
the fields cannot be edited, but empty fields can be edited. Is this
possible?
Should be. Are you already comfortable with working with the forms API?
You could test for a value (if !empty) and set #disabled = TRUE for the form
element if there is an existing value.
Allow me to ask a "dummy" question.. just gone through the form API
documentation and some tutorials. Where do I put my faorm api code? on the
themes template.php?
You will want to build a small custom module to house your forms api code.
This requires nothing more than creating a .module file and a .info file.
For the .info file, you could just copy one from a module that you already
have installed, rename it, and edit it. For the .module file, you don't
need anything in it but your form_alter code
Comments
Re: Limiting editing of a field after it has been fill
By William Smith at 05/04/2010 - 09:14Should be. Are you already comfortable with working with the forms API?
You could test for a value (if !empty) and set #disabled = TRUE for the form
element if there is an existing value.
Re: Limiting editing of a field after it has been fill
By Mutuku Ndeti at 05/04/2010 - 09:31I am not yet comfortable...but thanks for pointing me in that direction. Let
me get myself comfortable
Re: Limiting editing of a field after it has been fill
By Mutuku Ndeti at 05/08/2010 - 03:17Allow me to ask a "dummy" question.. just gone through the form API
documentation and some tutorials. Where do I put my faorm api code? on the
themes template.php?
Re: Limiting editing of a field after it has been fill
By William Smith at 05/08/2010 - 06:54You will want to build a small custom module to house your forms api code.
This requires nothing more than creating a .module file and a .info file.
For the .info file, you could just copy one from a module that you already
have installed, rename it, and edit it. For the .module file, you don't
need anything in it but your form_alter code
Best,
William