Reputation: 912
I'm having a strange behaviour after the last update with the createItem function of a datasource in create mode. My datasource is a mysql table.
I get it from my custom create functions as well as from the auto generated forms:
Exception caught: Exception caught: 8 exceptions caught: (TypeError) : Cannot read property 'sb' of null; (TypeError) : Cannot read property 'sb' of null; (TypeError) : Cannot read property 'sb' of null; (TypeError) : Cannot read property 'sb' of null; (TypeError) : Cannot read property 'sb' of null; (TypeError) : Cannot read property 'sb' of null; (TypeError) : Cannot read property 'sb' of null; (TypeError) : Cannot read property 'sb' of null
at NewPage.Form1.Form1Footer.Form1SubmitButton.onClick:1:19
None of the fields are mandatory, ID is AI and no formats or regex are in place
Any ideas?
Upvotes: 0
Views: 347
Reputation: 912
I think I found the issue.
I have a few query builder rules in place for many of my datasources, they respond to a widget that has a create mode datasource.
When the createItem() event is called, all the elements of the datasoure in create mode are removed before being saved. => is this the expected behavior?
Therefore the values of my widgets are null, since their datasources have been refreshed and filtered with the value in the query builder.
Long story short: don't bind query builder variables to values of widgets in create mode.
Upvotes: 2