Support

Account

Forum Replies Created

  • Ok, got it I haven’t seen acf_add_local_field() in the docs. Maybe mention it on pair with in the update_field() doc. (maybe it’s there, I’m lazy to look it up)

  • It wasn’t really an issue, but a feature suggestion.

  • I wrote error tracking that parses the ACF JSON-s so fields must match, otherwise it explodes 🙂

  • Hello, I want to store data in my ACF field structure. I used these two lines:

    add_post_meta( $insert_id, $field, $value );
    add_post_meta( $insert_id, '_'.$field, $acf_fields[ $field ] );
  • Thanks I’ll look into it.
    I think the ACF admin needs some improvement, because it shouldn’t allow me to save something that’s guaranteed to not work.

  • I’ll try to update.

    Right, there’s another flexible type for the page:

    
    {
        "key": "group_563d1d37c374d",
        "title": "Content Cards",
        "fields": [
            {
                "key": "field_563d1d62fc0b2",
                "label": "Cards",
                "name": "cards",
                "type": "flexible_content",
                "instructions": "",
                "required": 0,
                "conditional_logic": 0,
                "wrapper": {
                    "width": "",
                    "class": "",
                    "id": ""
                },
                "button_label": "Add Card",
                "min": "",
                "max": "",
                "layouts": [
                    {
                        "key": "563d1d9a9dace",
                        "name": "image_card",
                        "label": "Image Card",
                        "display": "block",
                        "sub_fields": [
                            {
                                "key": "field_563d1db4fc0b3",
                                "label": "Image",
                                "name": "image",
                                "type": "image",
                                "instructions": "",
                                "required": 0,
                                "conditional_logic": 0,
                                "wrapper": {
                                    "width": "",
                                    "class": "",
                                    "id": ""
                                },
                                "return_format": "array",
                                "preview_size": "thumbnail",
                                "library": "all",
                                "min_width": "",
                                "min_height": "",
                                "min_size": "",
                                "max_width": "",
                                "max_height": "",
                                "max_size": "",
                                "mime_types": ""
                            },
                            {
                                "key": "field_563d1f8874ea4",
                                "label": "Image Size",
                                "name": "image_size",
                                "type": "radio",
                                "instructions": "",
                                "required": 1,
                                "conditional_logic": 0,
                                "wrapper": {
                                    "width": "",
                                    "class": "",
                                    "id": ""
                                },
                                "choices": {
                                    "full-image": "Full",
                                    "half-image": "Half"
                                },
                                "other_choice": 0,
                                "save_other_choice": 0,
                                "default_value": "full-image",
                                "layout": "horizontal"
                            },
                            {
                                "key": "field_563d1e3bfc0b4",
                                "label": "Title",
                                "name": "",
                                "type": "text",
                                "instructions": "",
                                "required": 0,
                                "conditional_logic": 0,
                                "wrapper": {
                                    "width": "",
                                    "class": "",
                                    "id": ""
                                },
                                "default_value": "",
                                "placeholder": "",
                                "prepend": "",
                                "append": "",
                                "maxlength": "",
                                "readonly": 0,
                                "disabled": 0
                            },
                            {
                                "key": "field_563d1e5a74ea2",
                                "label": "Subtitle",
                                "name": "subtitle",
                                "type": "text",
                                "instructions": "",
                                "required": 0,
                                "conditional_logic": 0,
                                "wrapper": {
                                    "width": "",
                                    "class": "",
                                    "id": ""
                                },
                                "default_value": "",
                                "placeholder": "",
                                "prepend": "",
                                "append": "",
                                "maxlength": "",
                                "readonly": 0,
                                "disabled": 0
                            },
                            {
                                "key": "field_563d1e7674ea3",
                                "label": "Card Size",
                                "name": "card_size",
                                "type": "radio",
                                "instructions": "",
                                "required": 1,
                                "conditional_logic": 0,
                                "wrapper": {
                                    "width": "",
                                    "class": "",
                                    "id": ""
                                },
                                "choices": {
                                    "layout-half": "Wide",
                                    "layout-fourth": "Narrow"
                                },
                                "other_choice": 0,
                                "save_other_choice": 0,
                                "default_value": "layout-fourth : Narrow",
                                "layout": "horizontal"
                            },
                            {
                                "key": "field_563d20b02daba",
                                "label": "Action",
                                "name": "",
                                "type": "flexible_content",
                                "instructions": "",
                                "required": 0,
                                "conditional_logic": 0,
                                "wrapper": {
                                    "width": "",
                                    "class": "",
                                    "id": ""
                                },
                                "button_label": "Add Action",
                                "min": "",
                                "max": "",
                                "layouts": [
                                    {
                                        "key": "563d20caa9985",
                                        "name": "external_link",
                                        "label": "External Link",
                                        "display": "block",
                                        "sub_fields": [
                                            {
                                                "key": "field_563d20e9f4a5d",
                                                "label": "URL",
                                                "name": "url",
                                                "type": "url",
                                                "instructions": "",
                                                "required": 0,
                                                "conditional_logic": 0,
                                                "wrapper": {
                                                    "width": "",
                                                    "class": "",
                                                    "id": ""
                                                },
                                                "default_value": "",
                                                "placeholder": ""
                                            },
                                            {
                                                "key": "field_563d21d8f4a6e",
                                                "label": "URL",
                                                "name": "url",
                                                "type": "url",
                                                "instructions": "",
                                                "required": 0,
                                                "conditional_logic": 0,
                                                "wrapper": {
                                                    "width": "",
                                                    "class": "",
                                                    "id": ""
                                                },
                                                "default_value": "",
                                                "placeholder": ""
                                            }
                                        ],
                                        "min": "",
                                        "max": ""
                                    },
                                    {
                                        "key": "563d210af4a5e",
                                        "name": "internal_link",
                                        "label": "Internal Link",
                                        "display": "block",
                                        "sub_fields": [
                                            {
                                                "key": "field_563d2119f4a5f",
                                                "label": "Content Reference",
                                                "name": "content_reference",
                                                "type": "relationship",
                                                "instructions": "",
                                                "required": 0,
                                                "conditional_logic": 0,
                                                "wrapper": {
                                                    "width": "",
                                                    "class": "",
                                                    "id": ""
                                                },
                                                "post_type": [],
                                                "taxonomy": [],
                                                "filters": [
                                                    "search",
                                                    "post_type"
                                                ],
                                                "elements": "",
                                                "min": "",
                                                "max": "",
                                                "return_format": "object"
                                            },
                                            {
                                                "key": "field_563d21d8f4a6f",
                                                "label": "Content Reference",
                                                "name": "content_reference",
                                                "type": "relationship",
                                                "instructions": "",
                                                "required": 0,
                                                "conditional_logic": 0,
                                                "wrapper": {
                                                    "width": "",
                                                    "class": "",
                                                    "id": ""
                                                },
                                                "post_type": [],
                                                "taxonomy": [],
                                                "filters": [
                                                    "search",
                                                    "post_type"
                                                ],
                                                "elements": "",
                                                "min": "",
                                                "max": "",
                                                "return_format": "object"
                                            }
                                        ],
                                        "min": "",
                                        "max": ""
                                    }
                                ]
                            }
                        ],
                        "min": "",
                        "max": ""
                    },
                    {
                        "key": "563d203e2dab3",
                        "name": "video_card",
                        "label": "Video Card",
                        "display": "block",
                        "sub_fields": [
                            {
                                "key": "field_563d205a2dab9",
                                "label": "Video URL",
                                "name": "video_url",
                                "type": "url",
                                "instructions": "",
                                "required": 1,
                                "conditional_logic": 0,
                                "wrapper": {
                                    "width": "",
                                    "class": "",
                                    "id": ""
                                },
                                "default_value": "",
                                "placeholder": ""
                            },
                            {
                                "key": "field_563d203e2dab4",
                                "label": "Image",
                                "name": "image",
                                "type": "image",
                                "instructions": "",
                                "required": 0,
                                "conditional_logic": 0,
                                "wrapper": {
                                    "width": "",
                                    "class": "",
                                    "id": ""
                                },
                                "return_format": "array",
                                "preview_size": "thumbnail",
                                "library": "all",
                                "min_width": "",
                                "min_height": "",
                                "min_size": "",
                                "max_width": "",
                                "max_height": "",
                                "max_size": "",
                                "mime_types": ""
                            },
                            {
                                "key": "field_563d203e2dab5",
                                "label": "Image Size",
                                "name": "image_size",
                                "type": "radio",
                                "instructions": "",
                                "required": 1,
                                "conditional_logic": 0,
                                "wrapper": {
                                    "width": "",
                                    "class": "",
                                    "id": ""
                                },
                                "choices": {
                                    "full-image": "Full",
                                    "half-image": "Half"
                                },
                                "other_choice": 0,
                                "save_other_choice": 0,
                                "default_value": "full-image",
                                "layout": "horizontal"
                            },
                            {
                                "key": "field_563d203e2dab6",
                                "label": "Title",
                                "name": "",
                                "type": "text",
                                "instructions": "",
                                "required": 0,
                                "conditional_logic": 0,
                                "wrapper": {
                                    "width": "",
                                    "class": "",
                                    "id": ""
                                },
                                "default_value": "",
                                "placeholder": "",
                                "prepend": "",
                                "append": "",
                                "maxlength": "",
                                "readonly": 0,
                                "disabled": 0
                            },
                            {
                                "key": "field_563d203e2dab7",
                                "label": "Subtitle",
                                "name": "subtitle",
                                "type": "text",
                                "instructions": "",
                                "required": 0,
                                "conditional_logic": 0,
                                "wrapper": {
                                    "width": "",
                                    "class": "",
                                    "id": ""
                                },
                                "default_value": "",
                                "placeholder": "",
                                "prepend": "",
                                "append": "",
                                "maxlength": "",
                                "readonly": 0,
                                "disabled": 0
                            },
                            {
                                "key": "field_563d203e2dab8",
                                "label": "Card Size",
                                "name": "card_size",
                                "type": "radio",
                                "instructions": "",
                                "required": 1,
                                "conditional_logic": 0,
                                "wrapper": {
                                    "width": "",
                                    "class": "",
                                    "id": ""
                                },
                                "choices": {
                                    "layout-half": "Wide",
                                    "layout-fourth": "Narrow"
                                },
                                "other_choice": 0,
                                "save_other_choice": 0,
                                "default_value": "layout-fourth : Narrow",
                                "layout": "horizontal"
                            }
                        ],
                        "min": "",
                        "max": ""
                    },
                    {
                        "key": "563d21d8f4a67",
                        "name": "cta_card",
                        "label": "CTA Card",
                        "display": "block",
                        "sub_fields": [
                            {
                                "key": "field_563d21d8f4a6a",
                                "label": "Title",
                                "name": "",
                                "type": "text",
                                "instructions": "",
                                "required": 0,
                                "conditional_logic": 0,
                                "wrapper": {
                                    "width": "",
                                    "class": "",
                                    "id": ""
                                },
                                "default_value": "",
                                "placeholder": "",
                                "prepend": "",
                                "append": "",
                                "maxlength": "",
                                "readonly": 0,
                                "disabled": 0
                            },
                            {
                                "key": "field_563d21d8f4a6b",
                                "label": "Subtitle",
                                "name": "subtitle",
                                "type": "text",
                                "instructions": "",
                                "required": 0,
                                "conditional_logic": 0,
                                "wrapper": {
                                    "width": "",
                                    "class": "",
                                    "id": ""
                                },
                                "default_value": "",
                                "placeholder": "",
                                "prepend": "",
                                "append": "",
                                "maxlength": "",
                                "readonly": 0,
                                "disabled": 0
                            },
                            {
                                "key": "field_563d21d8f4a6c",
                                "label": "Card Size",
                                "name": "card_size",
                                "type": "radio",
                                "instructions": "",
                                "required": 1,
                                "conditional_logic": 0,
                                "wrapper": {
                                    "width": "",
                                    "class": "",
                                    "id": ""
                                },
                                "choices": {
                                    "layout-half": "Wide",
                                    "layout-fourth": "Narrow"
                                },
                                "other_choice": 0,
                                "save_other_choice": 0,
                                "default_value": "layout-fourth : Narrow",
                                "layout": "horizontal"
                            },
                            {
                                "key": "field_563d21d8f4a6d",
                                "label": "Action",
                                "name": "",
                                "type": "flexible_content",
                                "instructions": "",
                                "required": 1,
                                "conditional_logic": 0,
                                "wrapper": {
                                    "width": "",
                                    "class": "",
                                    "id": ""
                                },
                                "button_label": "Add Action",
                                "min": "",
                                "max": "",
                                "layouts": [
                                    {
                                        "key": "563d20caa9985",
                                        "name": "external_link",
                                        "label": "External Link",
                                        "display": "block",
                                        "sub_fields": [],
                                        "min": "",
                                        "max": ""
                                    },
                                    {
                                        "key": "563d210af4a5e",
                                        "name": "internal_link",
                                        "label": "Internal Link",
                                        "display": "block",
                                        "sub_fields": [],
                                        "min": "",
                                        "max": ""
                                    }
                                ]
                            }
                        ],
                        "min": "",
                        "max": ""
                    }
                ]
            }
        ],
        "location": [
            [
                {
                    "param": "page_template",
                    "operator": "==",
                    "value": "page-home.php"
                }
            ]
        ],
        "menu_order": 2,
        "position": "normal",
        "style": "default",
        "label_placement": "top",
        "instruction_placement": "label",
        "hide_on_screen": [
            "the_content"
        ],
        "active": 1,
        "description": "",
        "modified": 1446847034
    }
    
Viewing 7 posts - 1 through 7 (of 7 total)