# Access field definitions

For each of the scopes, ACF offers custom fields for, selected properties from the custom fields definitions are surfaced to a special Metafield for you to use in your theme with Liquid.\
\
You can query the defined labels, the instructions, etc. or show your custom fields on the storefront in the same order as defined in ACF.

### Metafields

If any custom fields have been created for the scope, the following Metafields are available:\
\
\&#xNAN;*shop.metafields.acf\_settings.product*\
\&#xNAN;*shop.metafields.acf\_settings.variant*\
\&#xNAN;*shop.metafields.acf\_settings.collection*\
\&#xNAN;*shop.metafields.acf\_settings.page*\
\&#xNAN;*shop.metafields.acf\_settings.blog*\
\&#xNAN;*shop.metafields.acf\_settings.article*\
\&#xNAN;*shop.metafields.acf\_settings.order*\
\&#xNAN;*shop.metafields.acf\_settings.customer*\
\&#xNAN;*shop.metafields.acf\_settings.shop*\
\&#xNAN;*shop.metafields.acf\_settings.product\_type*\
\&#xNAN;*shop.metafields.acf\_settings.vendor*\
\&#xNAN;*shop.metafields.acf\_settings.location*\
\&#xNAN;*shop.metafields.acf\_settings.global*

\
Each of these Metafields contains a fields array containing the defined fields - excluding any sections.

### Properties

Each element in the fields array has the following properties:

> name

The name defined for the custom field. This is used as the **key** property in the Metafields created for each value.

> namespace

The namespace defined for the custom field. This is used as the **namespace** property in the Metafields created for each value.

> type

The type of field (text, checkbox, etc.).

> label

The label defined for the custom field, which is also used in the ACF editor.

> instructions

These are the same instructions as shown in the ACF editor (with any Markdown translated into HTML). When using these on the storefront, take care that they are not authored for internal use.

> repeatable

A boolean **true** if the field is defined as repeatable.

> value

Depends on the type of field. For example, for a Media field, the value will be a pipe-separated list of MIME type&#x73;*,* or for a Selection field a pipe-separated list of options.

> allow\_multiple

A boolean **true** if the field allows for multiple selections.

> section

If this field belongs to a section, you will find an id property for that section as well as a label property with the section's label. The id property is a unique internal id, that allows you to logically discern which fields belong to different sections.

### Examples&#x20;

*Showing the label for the field "size" before the field value:*

```liquid
{% assign field = shop.metafields.acf_settings.product.fields | where: "name", "size" | first %}
<p>{{ field.label }}: {{ product.metafields.accentuate.size }}</p>
```

*Listing custom fields in the same order as defined in ACF:*

```liquid
{% for field in shop.metafields.acf_settings.product.fields %}
  {% assign field_value = product.metafields[field.namespace][field.name] %}
  <p>{{ field.label }}: {{ field_value }}</p>
{% endfor %}
```

*Listing custom fields with section headers:*

```liquid
{% for field in shop.metafields.acf_settings.product.fields %}

  {% assign field_section = field.section %}
  {% assign field_value = product.metafields[field.namespace][field.name] %}

  {% if field_section.id != current_section.id %}
  <h3>{{ field_section.label }}</h3>
  {% endif %}
  <p>{{ field.label }}: {{ field_value }}</p>

  {% assign current_section = field_section %}

{% endfor %}
```

*Getting the entry for a specific field:*

```liquid
{‰ assign my_field_def = shop.metafields.acf_settings.product.fields | where: "namespace", "accentuate" | where: "name", "my_custom_field" | first %}

{% if my_field_def.repeatable %}
  <p>This field is defined as repeatable</p>
{% endif %}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.accentuate.io/liquid-guides/access-field-definitions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
