{"action":"created","issue":{"url":"https://api.github.com/repos/getgrav/grav-plugin-admin/issues/688","repository_url":"https://api.github.com/repos/getgrav/grav-plugin-admin","labels_url":"https://api.github.com/repos/getgrav/grav-plugin-admin/issues/688/labels{/name}","comments_url":"https://api.github.com/repos/getgrav/grav-plugin-admin/issues/688/comments","events_url":"https://api.github.com/repos/getgrav/grav-plugin-admin/issues/688/events","html_url":"https://github.com/getgrav/grav-plugin-admin/issues/688","id":164527090,"number":688,"title":"toggleable: true within type: list is checking everything on save regardless","user":{"login":"jjui","id":12803729,"avatar_url":"https://avatars.githubusercontent.com/u/12803729?v=3","gravatar_id":"","url":"https://api.github.com/users/jjui","html_url":"https://github.com/jjui","followers_url":"https://api.github.com/users/jjui/followers","following_url":"https://api.github.com/users/jjui/following{/other_user}","gists_url":"https://api.github.com/users/jjui/gists{/gist_id}","starred_url":"https://api.github.com/users/jjui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jjui/subscriptions","organizations_url":"https://api.github.com/users/jjui/orgs","repos_url":"https://api.github.com/users/jjui/repos","events_url":"https://api.github.com/users/jjui/events{/privacy}","received_events_url":"https://api.github.com/users/jjui/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"w00fz","id":11734,"avatar_url":"https://avatars.githubusercontent.com/u/11734?v=3","gravatar_id":"","url":"https://api.github.com/users/w00fz","html_url":"https://github.com/w00fz","followers_url":"https://api.github.com/users/w00fz/followers","following_url":"https://api.github.com/users/w00fz/following{/other_user}","gists_url":"https://api.github.com/users/w00fz/gists{/gist_id}","starred_url":"https://api.github.com/users/w00fz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/w00fz/subscriptions","organizations_url":"https://api.github.com/users/w00fz/orgs","repos_url":"https://api.github.com/users/w00fz/repos","events_url":"https://api.github.com/users/w00fz/events{/privacy}","received_events_url":"https://api.github.com/users/w00fz/received_events","type":"User","site_admin":false},"assignees":[{"login":"w00fz","id":11734,"avatar_url":"https://avatars.githubusercontent.com/u/11734?v=3","gravatar_id":"","url":"https://api.github.com/users/w00fz","html_url":"https://github.com/w00fz","followers_url":"https://api.github.com/users/w00fz/followers","following_url":"https://api.github.com/users/w00fz/following{/other_user}","gists_url":"https://api.github.com/users/w00fz/gists{/gist_id}","starred_url":"https://api.github.com/users/w00fz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/w00fz/subscriptions","organizations_url":"https://api.github.com/users/w00fz/orgs","repos_url":"https://api.github.com/users/w00fz/repos","events_url":"https://api.github.com/users/w00fz/events{/privacy}","received_events_url":"https://api.github.com/users/w00fz/received_events","type":"User","site_admin":false}],"milestone":null,"comments":5,"created_at":"2016-07-08T13:08:21Z","updated_at":"2016-07-09T22:12:42Z","closed_at":"2016-07-09T07:18:09Z","body":"After spoken with @flaviocopes we narrowed it down to this. \r\n\r\nIf `toggleable: true` is present for fields within `type: list`, they all will be `checked` on save regardless if there are any data provided to the field/s or not. Heard that you, @w00fz where the expert on this ;)\r\n\r\nWhat can be a solution?\r\n\r\nLazy example: \r\n```\r\ndependencies:\r\n  - { name: grav, version: '~1.1' }\r\n\r\nform:\r\n  validation: loose\r\n  fields:\r\n\r\n    tabs:\r\n      type: tabs\r\n      active: 1\r\n\r\n      fields:\r\n        -\r\n          type: tab\r\n          title: General\r\n\r\n          fields: \r\n\r\n            general:\r\n              type: section\r\n              title: General\r\n              underline: true\r\n\r\n              fields:\r\n\r\n                enabled:\r\n                  type: toggle\r\n                  label: PLUGIN_ADMIN.PLUGIN_STATUS\r\n                  highlight: 1\r\n                  default: 0\r\n                  options:\r\n                    1: PLUGIN_ADMIN.ENABLED\r\n                    0: PLUGIN_ADMIN.DISABLED\r\n                  validate:\r\n                    type: bool\r\n\r\n                built_in_css:\r\n                  type: toggle\r\n                  label: Use built in CSS\r\n                  highlight: 1\r\n                  default: 1\r\n                  options:\r\n                    1: PLUGIN_ADMIN.ENABLED\r\n                    0: PLUGIN_ADMIN.DISABLED\r\n                  validate:\r\n                    type: bool\r\n\r\n        -\r\n          type: tab\r\n          title: Notifications\r\n\r\n          fields:\r\n\r\n            notifications_info:\r\n              type: section\r\n              title: Notifications\r\n              underline: true\r\n\r\n              fields:\r\n\r\n                notifications:\r\n                  type: list\r\n                  style: vertical\r\n                  \r\n                  fields:\r\n                    \r\n                    info_message:\r\n                      type: display\r\n                      style: vertical\r\n                      markdown: true\r\n                      content: '### Basic'\r\n# ID\r\n                    .id:\r\n                      type: hidden\r\n                      default: \"random()\"\r\n                      evaluate: true\r\n                      validate:\r\n                        type: string\r\n# Enabled\r\n                    .enabled:\r\n                      type: toggle\r\n                      label: Activate\r\n                      highlight: 1\r\n                      default: 1\r\n                      options:\r\n                        1: PLUGIN_ADMIN.ENABLED\r\n                        0: PLUGIN_ADMIN.DISABLED\r\n                      validate:\r\n                        type: bool\r\n# Message\r\n                    .message:\r\n                      type: editor\r\n                      label: Message:\r\n                      default: 'stripped'\r\n\r\n                    info_settings:\r\n                      type: display\r\n                      style: vertical\r\n                      markdown: true\r\n                      content: '### Settings'\r\n\r\n                    info_visit_limit:\r\n                      type: display\r\n                      style: vertical\r\n                      markdown: true\r\n                      content: '**Visit limits**'\r\n# Display on number\r\n                    .display_on_number:\r\n                      type: text\r\n                      size: x-small\r\n                      label: Display on visit number:\r\n                      toggleable: true\r\n                      append: visit\r\n                      validate:\r\n                        type: int\r\n                        min: 1\r\n# Hide on number\r\n                    .hide_on_number:\r\n                      type: text\r\n                      size: x-small\r\n                      label: Hide on visit number:\r\n                      toggleable: true\r\n                      append: visit\r\n                      validate:\r\n                        type: int\r\n                        min: 1\r\n\r\n                    info_time_limit:\r\n                      type: display\r\n                      style: vertical\r\n                      markdown: true\r\n                      content: '**Time limits**'\r\n# Start time limit\r\n                    .start_time_limit:\r\n                      type: text\r\n                      size: x-small\r\n                      label: Display after:\r\n                      toggleable: true\r\n                      append: seconds\r\n                      validate:\r\n                        type: int\r\n                        min: 1\r\n# End time limit\r\n                    .end_time_limit:\r\n                      type: text\r\n                      size: x-small\r\n                      label: Hide after:\r\n                      toggleable: true\r\n                      append: seconds\r\n                      validate:\r\n                        type: int\r\n                        min: 1\r\n\r\n                    info_datetime:\r\n                      type: display\r\n                      style: vertical\r\n                      markdown: true\r\n                      content: '**Date & Hour**'\r\n# Start date\r\n                    .start_date:\r\n                      type: datetime\r\n                      size: small\r\n                      label: Display on date:\r\n                      toggleable: true\r\n# End date\r\n                    .end_date:\r\n                      type: datetime\r\n                      size: small\r\n                      label: Hide on date:\r\n                      toggleable: true\r\n```"},"comment":{"url":"https://api.github.com/repos/getgrav/grav-plugin-admin/issues/comments/231558686","html_url":"https://github.com/getgrav/grav-plugin-admin/issues/688#issuecomment-231558686","issue_url":"https://api.github.com/repos/getgrav/grav-plugin-admin/issues/688","id":231558686,"user":{"login":"w00fz","id":11734,"avatar_url":"https://avatars.githubusercontent.com/u/11734?v=3","gravatar_id":"","url":"https://api.github.com/users/w00fz","html_url":"https://github.com/w00fz","followers_url":"https://api.github.com/users/w00fz/followers","following_url":"https://api.github.com/users/w00fz/following{/other_user}","gists_url":"https://api.github.com/users/w00fz/gists{/gist_id}","starred_url":"https://api.github.com/users/w00fz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/w00fz/subscriptions","organizations_url":"https://api.github.com/users/w00fz/orgs","repos_url":"https://api.github.com/users/w00fz/repos","events_url":"https://api.github.com/users/w00fz/events{/privacy}","received_events_url":"https://api.github.com/users/w00fz/received_events","type":"User","site_admin":false},"created_at":"2016-07-09T22:12:42Z","updated_at":"2016-07-09T22:12:42Z","body":"Try adding `default: ''` for those entries. I think it's because it automatically tries to populate with the current date otherwise."}}
{"actor":{"display_login":"w00fz"}}