Support

Account

Home Forums Front-end Issues Disabling fields in ACF forms

Solved

Disabling fields in ACF forms

  • Is it possible to modify ACF forms in php so the front-end form field renders as a div instead of a form field?

    I want specific fields to be locked and uneditable in the front end.

  • Is it possible?

    Yes. You could create an acf/prepare_field filter https://www.advancedcustomfields.com/resources/acf-prepare_field/.

    In this filter you could convert the field from whatever type of field it is into a message field to show the value of the field as a the message.

    Alternately, for some type of fields, you can disable them or make them read only.

  • Yes!

    This seems to be the key to what im looking for!

    I am having an issue with it though,
    “Message” fields use a “message” value to hold what they display.

    I cant figure out how to pass the previous value into the “message”.

  • Nevermind!

    This actually worked perfectly

    I accidently used load_value instead of prepare_field, leftover from my previous attempts.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.