Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Children with the same key bug #22

Closed
batusai513 opened this issue Jun 30, 2016 · 3 comments
Closed

Children with the same key bug #22

batusai513 opened this issue Jun 30, 2016 · 3 comments

Comments

@batusai513
Copy link
Contributor

batusai513 commented Jun 30, 2016

Hi, i'm using this library but i'm getting this error describe above
captura de pantalla 2016-06-30 a las 5 07 47 p m
captura de pantalla 2016-07-01 a las 9 12 56 a m

this is the JSON that Form.io is generating:

{
   "_id":"577422c86eb8a901003f6401",
   "modified":"2016-06-30T21:18:36.294Z",
   "title":"Register Pacient Form",
   "display":"form",
   "type":"form",
   "action":"https://potatoes.com/registerpacient",
   "name":"registerPacientForm",
   "path":"registerpacient",
   "project":"57741e776eb8a901003f63ed",
   "created":"2016-06-29T19:34:32.215Z",
   "components":[
      {
         "conditional":{
            "eq":"",
            "when":null,
            "show":null
         },
         "type":"htmlelement",
         "content":"Pacient Registration Form",
         "className":"delta",
         "attrs":[
            {
               "value":"",
               "attr":""
            }
         ],
         "tag":"h1",
         "input":false
      },
      {
         "conditional":{
            "eq":"",
            "when":null,
            "show":null
         },
         "type":"htmlelement",
         "content":"",
         "className":"",
         "attrs":[
            {
               "value":"",
               "attr":""
            }
         ],
         "tag":"div",
         "input":false
      },
      {
         "conditional":{
            "eq":"",
            "when":null,
            "show":null
         },
         "type":"fieldset",
         "components":[
            {
               "isNew":false,
               "conditional":{
                  "eq":"",
                  "when":null,
                  "show":null
               },
               "type":"columns",
               "columns":[
                  {
                     "components":[
                        {
                           "conditional":{
                              "eq":"",
                              "when":null,
                              "show":null
                           },
                           "type":"datetime",
                           "validate":{
                              "custom":"",
                              "required":true
                           },
                           "persistent":true,
                           "protected":false,
                           "timePicker":{
                              "arrowkeys":true,
                              "mousewheel":true,
                              "readonlyInput":false,
                              "showMeridian":true,
                              "minuteStep":1,
                              "hourStep":1
                           },
                           "datePicker":{
                              "datepickerMode":"day",
                              "yearRange":"20",
                              "maxMode":"year",
                              "minMode":"day",
                              "initDate":"",
                              "startingDay":0,
                              "showWeeks":true
                           },
                           "datepickerMode":"day",
                           "enableTime":false,
                           "enableDate":true,
                           "format":"yyyy-MM-dd",
                           "placeholder":"Today's Date",
                           "key":"todaysDate",
                           "label":"Today's Date",
                           "tableView":true,
                           "input":true
                        }
                     ]
                  },
                  {
                     "components":[

                     ]
                  }
               ],
               "input":false
            }
         ],
         "legend":"",
         "tableView":true,
         "input":false
      },
      {
         "conditional":{
            "eq":"",
            "when":null,
            "show":null
         },
         "type":"fieldset",
         "components":[
            {
               "isNew":false,
               "type":"textfield",
               "conditional":{
                  "eq":"",
                  "when":null,
                  "show":null
               },
               "validate":{
                  "customPrivate":false,
                  "custom":"",
                  "pattern":"",
                  "maxLength":"",
                  "minLength":"",
                  "required":true
               },
               "persistent":true,
               "unique":false,
               "protected":false,
               "defaultValue":"",
               "multiple":false,
               "suffix":"",
               "prefix":"",
               "placeholder":"Patient Name",
               "key":"patientName",
               "label":"Patient Name",
               "inputMask":"",
               "inputType":"text",
               "tableView":true,
               "input":true
            },
            {
               "isNew":false,
               "conditional":{
                  "eq":"",
                  "when":null,
                  "show":null
               },
               "type":"columns",
               "columns":[
                  {
                     "components":[
                        {
                           "type":"textfield",
                           "conditional":{
                              "eq":"",
                              "when":null,
                              "show":null
                           },
                           "validate":{
                              "customPrivate":false,
                              "custom":"",
                              "pattern":"",
                              "maxLength":"",
                              "minLength":"",
                              "required":true
                           },
                           "persistent":true,
                           "unique":false,
                           "protected":false,
                           "defaultValue":"",
                           "multiple":false,
                           "suffix":"",
                           "prefix":"",
                           "placeholder":"Social Security Number",
                           "key":"socialSecurityNumber",
                           "label":"Social Security Number",
                           "inputMask":"999-999-999",
                           "inputType":"text",
                           "tableView":true,
                           "input":true
                        }
                     ]
                  },
                  {
                     "components":[
                        {
                           "conditional":{
                              "eq":"",
                              "when":null,
                              "show":null
                           },
                           "type":"columns",
                           "columns":[
                              {
                                 "components":[
                                    {
                                       "conditional":{
                                          "eq":"",
                                          "when":null,
                                          "show":null
                                       },
                                       "type":"datetime",
                                       "validate":{
                                          "custom":"",
                                          "required":true
                                       },
                                       "persistent":true,
                                       "protected":false,
                                       "timePicker":{
                                          "arrowkeys":true,
                                          "mousewheel":true,
                                          "readonlyInput":false,
                                          "showMeridian":true,
                                          "minuteStep":1,
                                          "hourStep":1
                                       },
                                       "datePicker":{
                                          "datepickerMode":"day",
                                          "yearRange":"20",
                                          "maxMode":"year",
                                          "minMode":"day",
                                          "initDate":"",
                                          "startingDay":0,
                                          "showWeeks":true
                                       },
                                       "datepickerMode":"day",
                                       "enableTime":false,
                                       "enableDate":true,
                                       "format":"yyyy-MM-dd",
                                       "placeholder":"Date of Birth",
                                       "key":"dateofBirth",
                                       "label":"Date of Birth",
                                       "tableView":true,
                                       "input":true
                                    }
                                 ]
                              },
                              {
                                 "components":[
                                    {
                                       "conditional":{
                                          "eq":"",
                                          "when":null,
                                          "show":null
                                       },
                                       "type":"number",
                                       "validate":{
                                          "custom":"",
                                          "multiple":"",
                                          "integer":"",
                                          "step":"1",
                                          "max":"",
                                          "min":"",
                                          "required":true
                                       },
                                       "persistent":true,
                                       "protected":false,
                                       "defaultValue":0,
                                       "suffix":"",
                                       "prefix":"",
                                       "placeholder":"Age",
                                       "key":"age",
                                       "label":"Age",
                                       "inputType":"number",
                                       "tableView":true,
                                       "input":true
                                    }
                                 ]
                              }
                           ],
                           "input":false
                        }
                     ]
                  }
               ],
               "input":false
            },
            {
               "input":false,
               "columns":[
                  {
                     "components":[
                        {
                           "input":true,
                           "tableView":true,
                           "inputType":"text",
                           "inputMask":"",
                           "label":"Address",
                           "key":"address",
                           "placeholder":"Address",
                           "prefix":"",
                           "suffix":"",
                           "multiple":false,
                           "defaultValue":"",
                           "protected":false,
                           "unique":false,
                           "persistent":true,
                           "validate":{
                              "required":true,
                              "minLength":"",
                              "maxLength":"",
                              "pattern":"",
                              "custom":"",
                              "customPrivate":false
                           },
                           "conditional":{
                              "show":null,
                              "when":null,
                              "eq":""
                           },
                           "type":"textfield"
                        }
                     ]
                  },
                  {
                     "components":[
                        {
                           "input":false,
                           "columns":[
                              {
                                 "components":[
                                    {
                                       "input":true,
                                       "tableView":true,
                                       "inputType":"text",
                                       "inputMask":"",
                                       "label":"Apartment Number",
                                       "key":"apartmentNumber",
                                       "placeholder":"Apartment Number",
                                       "prefix":"",
                                       "suffix":"",
                                       "multiple":false,
                                       "defaultValue":"",
                                       "protected":false,
                                       "unique":false,
                                       "persistent":true,
                                       "validate":{
                                          "required":false,
                                          "minLength":"",
                                          "maxLength":"",
                                          "pattern":"",
                                          "custom":"",
                                          "customPrivate":false
                                       },
                                       "conditional":{
                                          "show":null,
                                          "when":null,
                                          "eq":""
                                       },
                                       "type":"textfield"
                                    }
                                 ]
                              },
                              {
                                 "components":[

                                 ]
                              }
                           ],
                           "type":"columns",
                           "conditional":{
                              "show":null,
                              "when":null,
                              "eq":""
                           }
                        }
                     ]
                  }
               ],
               "type":"columns",
               "conditional":{
                  "show":null,
                  "when":null,
                  "eq":""
               }
            },
            {
               "input":false,
               "columns":[
                  {
                     "components":[
                        {
                           "input":true,
                           "tableView":true,
                           "inputType":"text",
                           "inputMask":"",
                           "label":"City",
                           "key":"city",
                           "placeholder":"City",
                           "prefix":"",
                           "suffix":"",
                           "multiple":false,
                           "defaultValue":"",
                           "protected":false,
                           "unique":false,
                           "persistent":true,
                           "validate":{
                              "required":true,
                              "minLength":"",
                              "maxLength":"",
                              "pattern":"",
                              "custom":"",
                              "customPrivate":false
                           },
                           "conditional":{
                              "show":null,
                              "when":null,
                              "eq":""
                           },
                           "type":"textfield"
                        }
                     ]
                  },
                  {
                     "components":[
                        {
                           "input":false,
                           "columns":[
                              {
                                 "components":[
                                    {
                                       "input":true,
                                       "tableView":true,
                                       "inputType":"text",
                                       "inputMask":"",
                                       "label":"State",
                                       "key":"state",
                                       "placeholder":"State",
                                       "prefix":"",
                                       "suffix":"",
                                       "multiple":false,
                                       "defaultValue":"",
                                       "protected":false,
                                       "unique":false,
                                       "persistent":true,
                                       "validate":{
                                          "required":true,
                                          "minLength":"",
                                          "maxLength":"",
                                          "pattern":"",
                                          "custom":"",
                                          "customPrivate":false
                                       },
                                       "conditional":{
                                          "show":null,
                                          "when":null,
                                          "eq":""
                                       },
                                       "type":"textfield"
                                    }
                                 ]
                              },
                              {
                                 "components":[
                                    {
                                       "conditional":{
                                          "eq":"",
                                          "when":null,
                                          "show":null
                                       },
                                       "type":"number",
                                       "validate":{
                                          "custom":"",
                                          "multiple":"",
                                          "integer":"",
                                          "step":"any",
                                          "max":5,
                                          "min":5,
                                          "required":true
                                       },
                                       "persistent":true,
                                       "protected":false,
                                       "defaultValue":0,
                                       "suffix":"",
                                       "prefix":"",
                                       "placeholder":"Zip",
                                       "key":"zip",
                                       "label":"Zip",
                                       "inputType":"number",
                                       "tableView":true,
                                       "input":true
                                    }
                                 ]
                              }
                           ],
                           "type":"columns",
                           "conditional":{
                              "show":null,
                              "when":null,
                              "eq":""
                           }
                        }
                     ]
                  }
               ],
               "type":"columns",
               "conditional":{
                  "show":null,
                  "when":null,
                  "eq":""
               }
            }
         ],
         "legend":"Patient's basic information",
         "tableView":true,
         "input":false
      },
      {
         "customClass":"button button--default",
         "conditional":{
            "eq":"",
            "when":null,
            "show":null
         },
         "type":"button",
         "theme":"primary",
         "disableOnInvalid":true,
         "action":"submit",
         "block":false,
         "rightIcon":"",
         "leftIcon":"",
         "size":"md",
         "key":"submit",
         "tableView":false,
         "label":"Submit",
         "input":true
      }
   ],
   "owner":"56df54d0acb1fa0100471847",
   "submissionAccess":[
      {
         "type":"create_all",
         "roles":[
            "57741e776eb8a901003f63f0"
         ]
      },
      {
         "type":"read_all",
         "roles":[

         ]
      },
      {
         "type":"update_all",
         "roles":[

         ]
      },
      {
         "type":"delete_all",
         "roles":[

         ]
      },
      {
         "type":"create_own",
         "roles":[

         ]
      },
      {
         "type":"read_own",
         "roles":[

         ]
      },
      {
         "type":"update_own",
         "roles":[

         ]
      },
      {
         "type":"delete_own",
         "roles":[

         ]
      }
   ],
   "access":[
      {
         "type":"read_all",
         "roles":[
            "57741e776eb8a901003f63ee",
            "57741e776eb8a901003f63ef",
            "57741e776eb8a901003f63f0"
         ]
      }
   ],
   "tags":[

   ]
}
@randallknutson
Copy link
Contributor

I think I know what this is. Let me take a look and get it fixed.

@randallknutson
Copy link
Contributor

This should be fixed now in commit 3a300a0

I'll release a new build shortly.

@randallknutson
Copy link
Contributor

0.5.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants