Disclaimer: This website requires Please enable JavaScript in your browser settings for the best experience.

Dev GuideAPI ReferenceChangelog
Dev GuideAPI ReferenceChangelogUser GuideDev CommunityOptimizely AcademySubmit a ticketLog In
Dev Guide

Text field mapping

Optimizely Content Marketing Platform (CMP) supports mapping the ACF Text field to the structured content Text type field.

JSON example

{
  "core": {
    "key": "acf_text_field_uk",
    "name": "Text Field",
    "is_list": false,
    "is_required": false,
    "need_internationalization": false,
    "min_list_length": 1,
    "max_list_length": -1,  // no max length limit
    "field_type": "text-field",
    "source_id": null,
    "source_metadata": "{\"is_custom_post_type_field\": true}",  // It is important to identify source_metadata as custom field
    "order_index": 0,
    "help_text": null,
    "editor_metadata": null
  },
  "validation_pattern": ".*",  // Validation required. Here it will accept anything, but we can define our own validation
  "min_length": 0,
  "max_length": -1,  // no max length limit
  "default_values": null
}