Disable Logic not working on checkboxes
I added a logic on checkbox for it to get disabled and enabled based on another checkbox. It was working fine earlier. After your update the logic is not working.
Which update broke the functionality? Can you provide the version where it no longer works? It also helps to provide a jsfiddle showing the issue.
It was working earlier but when I upgraded the library to version 3.6 the disable logic stopped working on check boxes. I can't provide the code.
Can you provide a demo form where this is not working?
@travist @randallknutson hello i face the same issue please see the below videos : https://drive.google.com/file/d/16Zy9ZyhuuGTcmoM2_33rPPxnx3c7mtbb/view?usp=sharing
https://drive.google.com/file/d/1zSg4uHl3zqMASgMjlIFmnWPeFc6Ucz5v/view?usp=sharing
Thanks for the info. We'll take a look.
@travist @randallknutson Hey, is this done yet?
@travist @randallknutson Any follow up here?
This issue is currently on one of our developer's list. We will let you know once this issue is resolved.
Thanks!
For me it looks field logic is not working anymore at all, it just hides the component when field logic is attached. I remember too, it worked in summer time :-)
I am facing the same issue. Any update or workaround for the same? @travist @randallknutson @wag110894
Here is an example of field logic working.
http://formio.github.io/formio.js/app/examples/fieldLogic.html
It must have something to do with your specific logic configurations. Can you provide the specific configurations that you have?
@travist Could you please give another configuration where -> we have 2 checkbox, named one and two. when I un-check checkbox one, checkbox two is disabled.
@travist
{ "_id": "5c4ad3f8eabd074156db9874", "type": "form", "tags": [], "owner": "5c4aca396faee6838fc867a2", "components": [ { "autofocus": false, "input": true, "inputType": "checkbox", "tableView": true, "label": "one", "dataGridLabel": false, "key": "one", "defaultValue": false, "protected": false, "persistent": true, "hidden": false, "name": "", "value": "", "clearOnHide": true, "validate": { "required": false }, "type": "checkbox", "labelPosition": "right", "hideLabel": false, "tags": [], "conditional": { "show": "", "when": null, "eq": "" }, "properties": {} }, { "autofocus": false, "input": true, "inputType": "checkbox", "tableView": true, "label": "two", "dataGridLabel": false, "key": "two", "defaultValue": false, "protected": false, "persistent": true, "hidden": false, "name": "", "value": "", "clearOnHide": true, "validate": { "required": false }, "type": "checkbox", "labelPosition": "right", "hideLabel": false, "tags": [], "conditional": { "show": "true", "when": "one", "eq": "true" }, "properties": {} } ], "revisions": "", "_vid": 0, "title": "checkbox test", "display": "form", "access": [ { "roles": [ "5c4aca4aa3e8afa2afe0e4e2", "5c4aca4aa3e8af0e06e0e4e3", "5c4aca4aa3e8aff7ace0e4e4" ], "type": "read_all" } ], "submissionAccess": [], "settings": {}, "name": "checkboxTest", "path": "checkboxtest", "project": "5c4aca4aa3e8af7b8ee0e4e1", "created": "2019-01-25T09:16:40.292Z", "modified": "2019-01-25T09:23:41.312Z", "machineName": "wnscbooqzizxjtm:checkboxTest" }
In the above code I have created 2 checkboxes named one and two. As per the logic, two should show true when one is true. But when logic is added to checkbox two, it gets hidden.
Have a look at this link for the demo.
https://formview.io/#/wnscbooqzizxjtm/checkboxtest?header=1
The logic will not work in the FormView application since that is an Angular 1.x renderer. Try it here...
https://formio.github.io/formio-viewer/dist/#/wnscbooqzizxjtm/checkboxtest
That is your form rendered using our core renderer.
@travist I tried another config at here: http://formio.github.io/formio.js/app/builder It should enable checkbox two when checkbox one has value true. But it just renders checkbox one. See the screenshot and JSON below:
JSON:
{ "display": "form", "components": [ { "label": "one", "shortcut": "", "mask": false, "tableView": true, "alwaysEnabled": false, "type": "checkbox", "input": true, "key": "one" }, { "label": "two", "shortcut": "", "mask": false, "disabled": true, "tableView": true, "alwaysEnabled": false, "type": "checkbox", "input": true, "key": "two", "logic": [ { "name": "enableLogic", "trigger": { "type": "simple", "simple": { "show": true, "when": "one", "eq": "true" } }, "actions": [ { "name": "enableAction", "type": "property", "property": { "label": "Disabled", "value": "disabled", "type": "boolean" }, "state": "false" } ] } ], "conditional": { "show": "", "when": "", "json": "" }, "customConditional": "" } ], "settings": { "pdf": { "id": "1ec0f8ee-6685-5d98-a847-26f67b67d6f0", "src": "https://files.form.io/pdf/5692b91fd1028f01000407e3/file/1ec0f8ee-6685-5d98-a847-26f67b67d6f0" } } }
@travist @randallknutson Any update?
No update. We added this to our planning, but is not prioritized. If this is urgent, then you can pay to expedite the resolution of this issue. Let us know if you want to go that route, but in the meantime, the only answer I have is we will get to it when we are done with other higher priority items.
It should also be noted, that the logic feature is open source if you would like to investigate the errors on your own.
@travist @randallknutson Is there any update on this?
This item is currently on one of our developers list. As Travis mentioned earlier, we do have an option to expedite this issue. Please contact [email protected].
Thanks.
Maybe this issue has been fixed already? Based on the JSON in https://github.com/formio/formio.js/issues/822#issuecomment-458096815, I have created https://jsfiddle.net/franke_mc/963nf54y/7/ , which looks ok to me. Am I missing something?