Form fields in modules

edited March 2014 in Modules
I have some question for form fields in admin edit form...
1. I have field last_login which is datetime in table. How to set this field to be only visible but nor editable (for information only) and formatted to human date.
2. Is there way to protect some fields from editing.

I think that I know how to do that using form_fields method in model, but maybe there is easy way...

Comments

  • edited 6:55AM
    1. You can set the field parameter displayonly => TRUE
    2. There is also a "readonly" and "disabled property you can set (readonly does't work for all fields per the HTML 5 spec)

    More on the parameters you can pass to fields can be found here:
    http://docs.getfuelcms.com/general/forms
Sign In or Register to comment.