⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

readOnly and invisible



mavershim
  • profile picture
  • Member

Posted 25 October 2012 - 00:29 AM

Hi,

Would like to know what are the difference between readOnly, invisible and hidden on field_type. I was just curious when i change the field type to invisible or readonly they do not past the value to callback.

Thanks

David Leiva
  • profile picture
  • Member

Posted 26 October 2012 - 16:38 PM

Read only just make read onlye the field. It still visible.
Invisible, is a little bit weird. it just really add the field to the form but invisble mode. So, it is there. and you can receive it in a callback for example.
however Hidden is a usefull type, because allows you to set a default value in a idden field.. for example an id.

Remeber: the function change_field_type "The third parameter ($value) only works for the hidden, enum and set field and it is not a default value for all the other types."

hoping help you
David