Support

Account

Home Forums Add-ons Repeater Field Issue with conditionals in repeater Reply To: Issue with conditionals in repeater

  • {
        "key": "group_570454af8e9ab",
        "title": "Call to action",
        "fields": [
            {
                "key": "field_570454b47c022",
                "label": "Call to action title",
                "name": "call_to_action_title",
                "type": "text",
                "instructions": "",
                "required": 0,
                "conditional_logic": 0,
                "wrapper": {
                    "width": "",
                    "class": "",
                    "id": ""
                },
                "default_value": "",
                "placeholder": "Call to action title",
                "prepend": "",
                "append": "",
                "maxlength": "",
                "readonly": 0,
                "disabled": 0
            },
            {
                "key": "field_570454c77c023",
                "label": "Call to action description",
                "name": "call_to_action_description",
                "type": "textarea",
                "instructions": "",
                "required": 0,
                "conditional_logic": 0,
                "wrapper": {
                    "width": "",
                    "class": "",
                    "id": ""
                },
                "default_value": "",
                "placeholder": "Call to action description",
                "maxlength": "",
                "rows": "",
                "new_lines": "wpautop",
                "readonly": 0,
                "disabled": 0
            },
            {
                "key": "field_570454e27c024",
                "label": "Call to action image",
                "name": "call_to_action_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_570454f37c025",
                "label": "Call to action image URL",
                "name": "call_to_action_image_url",
                "type": "url",
                "instructions": "",
                "required": 0,
                "conditional_logic": 0,
                "wrapper": {
                    "width": "",
                    "class": "",
                    "id": ""
                },
                "default_value": "",
                "placeholder": "Call to action image URL"
            },
            {
                "key": "field_5704550c7c026",
                "label": "Call to action buttons",
                "name": "call_to_action_buttons",
                "type": "repeater",
                "instructions": "",
                "required": 0,
                "conditional_logic": 0,
                "wrapper": {
                    "width": "",
                    "class": "",
                    "id": ""
                },
                "collapsed": "",
                "min": "",
                "max": 3,
                "layout": "table",
                "button_label": "Add Button",
                "sub_fields": [
                    {
                        "key": "field_570455267c027",
                        "label": "Button type",
                        "name": "button_type",
                        "type": "select",
                        "instructions": "",
                        "required": 0,
                        "conditional_logic": 0,
                        "wrapper": {
                            "width": "",
                            "class": "",
                            "id": ""
                        },
                        "choices": {
                            "external-url": "External URL",
                            "phone-number": "Phone number",
                            "enquiry-form": "Enquiry form",
                            "enquiry-form-address": "Enquiry form with address"
                        },
                        "default_value": [],
                        "allow_null": 0,
                        "multiple": 0,
                        "ui": 0,
                        "ajax": 0,
                        "placeholder": "",
                        "disabled": 0,
                        "readonly": 0
                    },
                    {
                        "key": "field_5704556c7c028",
                        "label": "Button label",
                        "name": "button_label",
                        "type": "text",
                        "instructions": "",
                        "required": 0,
                        "conditional_logic": 0,
                        "wrapper": {
                            "width": "",
                            "class": "",
                            "id": ""
                        },
                        "default_value": "",
                        "placeholder": "Button label",
                        "prepend": "",
                        "append": "",
                        "maxlength": "",
                        "readonly": 0,
                        "disabled": 0
                    },
                    {
                        "key": "field_570455797c029",
                        "label": "Button URL",
                        "name": "button_url",
                        "type": "url",
                        "instructions": "",
                        "required": 0,
                        "conditional_logic": [
                            [
                                {
                                    "field": "field_570455267c027",
                                    "operator": "==",
                                    "value": "external-url"
                                }
                            ]
                        ],
                        "wrapper": {
                            "width": "",
                            "class": "",
                            "id": ""
                        },
                        "default_value": "",
                        "placeholder": "Button URL"
                    }
                ]
            },
            {
                "key": "field_5704559b0e24e",
                "label": "Call to action products",
                "name": "call_to_action_products",
                "type": "repeater",
                "instructions": "",
                "required": 0,
                "conditional_logic": 0,
                "wrapper": {
                    "width": "",
                    "class": "",
                    "id": ""
                },
                "collapsed": "",
                "min": "",
                "max": "",
                "layout": "table",
                "button_label": "Add Product",
                "sub_fields": [
                    {
                        "key": "field_570455b20e24f",
                        "label": "Title",
                        "name": "title",
                        "type": "text",
                        "instructions": "",
                        "required": 0,
                        "conditional_logic": 0,
                        "wrapper": {
                            "width": "",
                            "class": "",
                            "id": ""
                        },
                        "default_value": "",
                        "placeholder": "Title",
                        "prepend": "",
                        "append": "",
                        "maxlength": "",
                        "readonly": 0,
                        "disabled": 0
                    },
                    {
                        "key": "field_570455b90e250",
                        "label": "Description",
                        "name": "description",
                        "type": "text",
                        "instructions": "",
                        "required": 0,
                        "conditional_logic": 0,
                        "wrapper": {
                            "width": "",
                            "class": "",
                            "id": ""
                        },
                        "default_value": "",
                        "placeholder": "Description",
                        "prepend": "",
                        "append": "",
                        "maxlength": "",
                        "readonly": 0,
                        "disabled": 0
                    },
                    {
                        "key": "field_570455c30e251",
                        "label": "Price",
                        "name": "price",
                        "type": "text",
                        "instructions": "",
                        "required": 0,
                        "conditional_logic": 0,
                        "wrapper": {
                            "width": "",
                            "class": "",
                            "id": ""
                        },
                        "default_value": "",
                        "placeholder": "Price",
                        "prepend": "",
                        "append": "",
                        "maxlength": "",
                        "readonly": 0,
                        "disabled": 0
                    },
                    {
                        "key": "field_570455ce0e252",
                        "label": "Button label",
                        "name": "button_label",
                        "type": "text",
                        "instructions": "",
                        "required": 0,
                        "conditional_logic": 0,
                        "wrapper": {
                            "width": "",
                            "class": "",
                            "id": ""
                        },
                        "default_value": "",
                        "placeholder": "Button label",
                        "prepend": "",
                        "append": "",
                        "maxlength": "",
                        "readonly": 0,
                        "disabled": 0
                    },
                    {
                        "key": "field_570455dd0e253",
                        "label": "Button URL",
                        "name": "button_url",
                        "type": "url",
                        "instructions": "",
                        "required": 0,
                        "conditional_logic": 0,
                        "wrapper": {
                            "width": "",
                            "class": "",
                            "id": ""
                        },
                        "default_value": "",
                        "placeholder": "Button URL"
                    }
                ]
            }
        ],
        "location": [
            [
                {
                    "param": "user_role",
                    "operator": "==",
                    "value": "all"
                },
                {
                    "param": "user_form",
                    "operator": "==",
                    "value": "edit"
                }
            ]
        ],
        "menu_order": 0,
        "position": "normal",
        "style": "default",
        "label_placement": "top",
        "instruction_placement": "label",
        "hide_on_screen": "",
        "active": 1,
        "description": "",
        "modified": 1460002594
    }