Support

Account

Home Forums Feature Requests Read-Only Field Reply To: Read-Only Field

  • Disabled fields are not submitted. In most cases since they are not submitted they will not be updated, but the current value should not be removed.

    Removal, or clearing of a value, or seeing the wrong value can happen under some conditions and these conditions all have to do with repeaters and flexible content fields. Disabled fields should be avoided in this situation.

    Disabled field can have issues with some field types, as described above for radio and select type fields. These fields are still submitted, even when a single option is disabled, so it will be submitted with no value.

    If I needed a field that needed to be available for review but not edit I would use a different field. Like a standard message field. I would have put in place an acf/prepare_field function for both fields. I would remove one of the fields based on the user type of the currently logged in user. If the message field is being shown I would dynamically generate the message to be displayed based on the value of the other field.

    The enhanced message field had it’s place at one time, but that was before ACF added the acf/prepare field hook. There is nothing that the enhanced massage field could do that cannot be accomplished with a standard message field using this hook.