[FIXED] How to use custom field options (base/advanced) in user interface

System Information
  • Strapi Version: 4.5.4
  • Operating System: Linux
  • Database: SQLite
  • Node Version: 18
  • NPM Version:
  • Yarn Version: 1.22.1

With custom fields you can define basic and advanced options. I would like to use the values of those in my input component.

I have a basic option called “options.notes”, this allows a user to give a field notes. I’d like to use this value in the input component (using the strapi design system). I searched the docs and source code but am still unable to find out how to get this working.

Found the answer:

When creating your Input you can add the attribute property:

onst EncryptableFieldInput = ({
                                 description,
                                 placeholder,
                                 disabled,
                                 error,
                                 intlLabel,
                                 labelAction,
                                 name,
                                 onChange,
                                 required,
                                 value,
                                 attribute // <- the filled in options can be found here
                               }) => {
console.log(attribute.options?.{your field}
}