Hi, The hook_form_alter() is an extremely powerful hook. If you only want the fields on this page to not be true form elements then what you can do is just change most or all the '#type' attributes to markup and just have the data being displayed. You may need to alter some of the other fields but this shouldn't be too hard. You could also make readonly equivalents of each of the elements so that you can theme them to look like what they are meant to look like. Gordon. On Wed, 2006-02-01 at 14:46 +1100, Sammy Spets wrote:
Thanks for the input again Adrian. I've hit a potential policy snag and thought it wise to discuss before continuing. I'd like to hear from anyone with 2 cents. :)
At present, readonly form fields are limited to only <input> tags. So our poor <select> doesn't have the ability to join its elite counterparts.
Why it is the readonly attribute is being used in the input tags rather than just showing the data without using a form element tag?
My reasoning is this: if a form element is used, including hidden, it opens up that form to abuse through edited forms. In addition, would it not be better to have a uniform readonly element generated?
I realise this would then prevent those fields from being sent back to the server. However, in the end it is more secure. Module changes required are relatively trivial since they have ready access to values currently in the database.
Let 'em rip!