Home › Forums › General Issues › Conditional fields are disabled and not working
I’ve got some repeater fields inside a flexible content field. These are shown conditionally if a true/false tick box is ticked.
The issue arises when this box is ticked and the flexible content is shown – all the text fields are disabled and the user cannot input any data.
Toggling the checkbox on and off again fixes this but this is in no way an ideal solution.
Please find the configuration below:
[
{
"key": "group_551a87a3a156d",
"title": "News Report Fields",
"fields": [
{
"key": "field_551a87b6ccfa7",
"label": "Is News Report?",
"name": "is_news_report",
"prefix": "",
"type": "true_false",
"instructions": "Please tick if this page is a news report.",
"required": 1,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"message": "",
"default_value": 0
},
{
"key": "field_551a8840e8ca4",
"label": "News Report Stories",
"name": "news_report_stories",
"prefix": "",
"type": "flexible_content",
"instructions": "Insert news stories into the fields below under their respective section.",
"required": 0,
"conditional_logic": [
[
{
"field": "field_551a87b6ccfa7",
"operator": "==",
"value": "1"
}
]
],
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"button_label": "Add News Report",
"min": "",
"max": "",
"layouts": [
{
"key": "551a8a3ecafdd",
"name": "news_report_stories_content",
"label": "News Report Stories",
"display": "block",
"sub_fields": [
{
"key": "field_551a8a40e8ca6",
"label": "Apps",
"name": "news_report_stories_apps",
"prefix": "",
"type": "repeater",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"min": "",
"max": "",
"layout": "row",
"button_label": "Add Row",
"sub_fields": [
{
"key": "field_551a8ed4e8ca7",
"label": "Title",
"name": "news_report_stories_apps_title",
"prefix": "",
"type": "text",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"placeholder": "",
"prepend": "",
"append": "",
"maxlength": "",
"readonly": 0,
"disabled": 0
},
{
"key": "field_551a8f01e8ca8",
"label": "Snippet",
"name": "news_report_stories_apps_snippet",
"prefix": "",
"type": "wysiwyg",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"tabs": "all",
"toolbar": "full",
"media_upload": 0
},
{
"key": "field_551aa03955d6b",
"label": "Publication",
"name": "news_report_stories_apps_publication",
"prefix": "",
"type": "text",
"instructions": " ",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"placeholder": "",
"prepend": "",
"append": "",
"maxlength": "",
"readonly": 0,
"disabled": 0
},
{
"key": "field_551a8f20e8ca9",
"label": "Link (URL)",
"name": "news_report_stories_apps_link",
"prefix": "",
"type": "text",
"instructions": "i.e. http:\/\/www.dimoso.com",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"placeholder": "",
"prepend": "",
"append": "",
"maxlength": "",
"readonly": 0,
"disabled": 0
}
]
},
{
"key": "field_551a94e24ed4d",
"label": "Games",
"name": "news_report_stories_games",
"prefix": "",
"type": "repeater",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"min": "",
"max": "",
"layout": "row",
"button_label": "Add Row",
"sub_fields": [
{
"key": "field_551a95094ed4e",
"label": "Title",
"name": "news_report_stories_games_title",
"prefix": "",
"type": "text",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"placeholder": "",
"prepend": "",
"append": "",
"maxlength": "",
"readonly": 0,
"disabled": 0
},
{
"key": "field_551a95264ed4f",
"label": "Snippet",
"name": "news_report_stories_games_snippet",
"prefix": "",
"type": "wysiwyg",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"tabs": "all",
"toolbar": "full",
"media_upload": 0
},
{
"key": "field_551aaae6476eb",
"label": "Publication",
"name": "news_report_stories_games_publication",
"prefix": "",
"type": "text",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"placeholder": "",
"prepend": "",
"append": "",
"maxlength": "",
"readonly": 0,
"disabled": 0
},
{
"key": "field_551a954a4ed50",
"label": "Link (URL)",
"name": "news_report_stories_games_link",
"prefix": "",
"type": "text",
"instructions": "i.e. http:\/\/www.dimoso.com",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"placeholder": "",
"prepend": "",
"append": "",
"maxlength": "",
"readonly": 0,
"disabled": 0
}
]
},
{
"key": "field_551a97ef90abe",
"label": "Mobile Advertising",
"name": "news_report_stories_mobile",
"prefix": "",
"type": "repeater",
"instructions": "",
"required": 1,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"min": 0,
"max": "",
"layout": "row",
"button_label": "Add Row",
"sub_fields": [
{
"key": "field_551a97ef90abf",
"label": "Title",
"name": "news_report_stories_mobile_title",
"prefix": "",
"type": "text",
"instructions": " ",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"placeholder": "",
"prepend": "",
"append": "",
"maxlength": "",
"readonly": 0,
"disabled": 0
},
{
"key": "field_551a97ef90ac0",
"label": "Snippet",
"name": "news_report_stories_mobile_snippet",
"prefix": "",
"type": "wysiwyg",
"instructions": " ",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"tabs": "all",
"toolbar": "full",
"media_upload": 1
},
{
"key": "field_551aab520495b",
"label": "Publication",
"name": "news_report_stories_mobile_publication",
"prefix": "",
"type": "text",
"instructions": "",
"required": 1,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"placeholder": "",
"prepend": "",
"append": "",
"maxlength": "",
"readonly": 0,
"disabled": 0
},
{
"key": "field_551a97ef90ac1",
"label": "Link (URL)",
"name": "news_report_stories_mobile_link",
"prefix": "",
"type": "text",
"instructions": "i.e. http:\/\/www.dimoso.com",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"placeholder": "",
"prepend": "",
"append": "",
"maxlength": "",
"readonly": 0,
"disabled": 0
}
]
},
{
"key": "field_551a982890ac2",
"label": "Investor & Business",
"name": "news_report_stories_business",
"prefix": "",
"type": "repeater",
"instructions": "",
"required": 1,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"min": 0,
"max": "",
"layout": "row",
"button_label": "Add Row",
"sub_fields": [
{
"key": "field_551a982890ac3",
"label": "Title",
"name": "news_report_stories_business_title",
"prefix": "",
"type": "text",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"placeholder": "",
"prepend": "",
"append": "",
"maxlength": "",
"readonly": 0,
"disabled": 0
},
{
"key": "field_551a982890ac4",
"label": "Snippet",
"name": "news_report_stories_business_snippet",
"prefix": "",
"type": "wysiwyg",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"tabs": "all",
"toolbar": "full",
"media_upload": 1
},
{
"key": "field_551aab6a0495c",
"label": "Publication",
"name": "news_report_stories_business_publication",
"prefix": "",
"type": "text",
"instructions": "",
"required": 1,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"placeholder": "",
"prepend": "",
"append": "",
"maxlength": "",
"readonly": 0,
"disabled": 0
},
{
"key": "field_551a982890ac5",
"label": "Link (URL)",
"name": "news_report_stories_business_link",
"prefix": "",
"type": "text",
"instructions": "i.e. http:\/\/www.dimoso.com",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"placeholder": "",
"prepend": "",
"append": "",
"maxlength": "",
"readonly": 0,
"disabled": 0
}
]
},
{
"key": "field_551a998590ac6",
"label": "Technology & Major Announcements",
"name": "news_report_stories_technology",
"prefix": "",
"type": "repeater",
"instructions": "",
"required": 1,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"min": 0,
"max": "",
"layout": "row",
"button_label": "Add Row",
"sub_fields": [
{
"key": "field_551a998590ac7",
"label": "Title",
"name": "news_report_stories_technology_title",
"prefix": "",
"type": "text",
"instructions": "",
"required": 1,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"placeholder": "",
"prepend": "",
"append": "",
"maxlength": "",
"readonly": 0,
"disabled": 0
},
{
"key": "field_551a998590ac8",
"label": "Snippet",
"name": "news_report_stories_technology_snippet",
"prefix": "",
"type": "wysiwyg",
"instructions": "",
"required": 1,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"tabs": "all",
"toolbar": "full",
"media_upload": 0
},
{
"key": "field_551aab7f0495d",
"label": "Publication",
"name": "news_report_stories_technology_publication",
"prefix": "",
"type": "text",
"instructions": " ",
"required": 1,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"placeholder": "",
"prepend": "",
"append": "",
"maxlength": "",
"readonly": 0,
"disabled": 0
},
{
"key": "field_551a998590ac9",
"label": "Link (URL)",
"name": "news_report_stories_technology_link",
"prefix": "",
"type": "text",
"instructions": "i.e. http:\/\/www.dimoso.com",
"required": 1,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"placeholder": "",
"prepend": "",
"append": "",
"maxlength": "",
"readonly": 0,
"disabled": 0
}
]
}
],
"min": "",
"max": ""
}
]
}
],
"location": [
[
{
"param": "post_type",
"operator": "==",
"value": "page"
}
]
],
"menu_order": 0,
"position": "normal",
"style": "default",
"label_placement": "top",
"instruction_placement": "label",
"hide_on_screen": ""
}
]
Does anyone know a fix? Thanks.
Hi @charkizard,
Thanks for the post.
I have just carried out a series of tests using your field group but I could not replicate the bug on v 5.3.7.
This issue was fixed on an earlier version.
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
CPT registration is coming to ACF! We demoed the new feature during the most recent session of ACF Chat Fridays. Check out the summary for the details. https://t.co/k2KQ3WWBAz
— Advanced Custom Fields (@wp_acf) March 7, 2023
© 2023 Advanced Custom Fields.
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.