Advanced Custom Fields (ACF) for Purple DAM
7 min
advanced custom fields for the purple dam you can add advanced custom fields (acfs) to media files in the purple dam to store structured metadata on any attachment type supported field types are select (dropdown) text text area checkbox radio button button group true / false date picker date time picker unsupported types are shown as plain text with a warning indicator step 1 create an acf field group click "add new" at the top of the acf field settings and give the new group a name (e g "additional fields for media") step 3 location rules each acf group needs to be displayed, either for specific media types, or for all in the case of all media make sure to set the rule for the group to attachements > is equal to > all step 3 creating an acf for media files for creation of acf fields read create custom fields in purple hub docid\ sfolj8v8qcn3m3jibzbuk step 4 using acfs as filters acfs can be used to filter files in the purple dam this can be achieved by checking the option 'filterable' see also configure acfs as filter docid 73k7oumo4sdk4nbwc3tuc required fields an acf field can be marked as required using acf's own "required" toggle in the field settings when a field is required, editors must fill it in at the point of uploading a file to the dam before they can save where this is enforced upload modal — files with empty required fields show a "missing required fields" indicator in the file list, the footer shows how many files are still incomplete, and the save button stays disabled until every required field (across all uploaded files) is filled in file detail popup — if a required field is emptied after the fact, the close (x) button is disabled and the header shows how many required fields are still empty required fields are marked with a red asterisk next to the field label, and a "this field is required" message appears below a field once the user leaves it empty mime type awareness a required field is only enforced for the file types its acf group actually applies to (via the group's location rules) for example, an acf group that only applies to videos will require its fields when uploading a video, but those fields are neither shown nor required when uploading an image or pdf configure the group's location rules to control which file types a required field applies to choosing where to require a field upload vs editor there are two different places a field can be made mandatory, and they solve different problems pick based on when the value actually needs to exist required on upload — enable acf's "required" toggle only if the field must be filled in the moment a file is added to the dam (for example, a mandatory copyright owner that every asset must carry regardless of where it is used) this is the behaviour described above required on usage / insertion — if a field should instead be mandatory only when a file is actually used or inserted into an article, do not use acf's "required" toggle configure the field as required for the respective media blocks in the purple blocks settings instead, so the value is enforced in the editor at insertion time see validating image blocks and meta information docid\ vgo21vthhxsslf1yz3xu9 do not enable acf's "required" toggle when what you actually want is editor level validation (or vice versa) upload level required blocks the upload itself; editor level required blocks publishing the article enabling the wrong one leads to fields being demanded at the wrong moment in the workflow