-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Data error in a field of the nested form type when creating a model. #5759
Comments
Any news?! |
Hi @Dok2314 Sometimes, unconventional code works because of a quirk in the design; when the quirk (bug) is fixed, the code breaks and forces you to write it according to the conventional design pattern. In this case, your issue is probably because of the following change: Here is the reason for the change:
I'm not 100% sure if this is the problem with your code, but hopefully, it offers some insight into a recent change to |
My model uses filterFields method, and in OctoberCMS 3.5, I fall into the method when i press "create", and due to changes in the getSaveValue method, I do not receive all the necessary data and get into the method, as a result I hide my own fields, before this did not happen, because all the necessary data came in. Use filterFields - it's not a unconventional code. |
You should be able to access via |
Example of my form.yaml:
fields:
primary:
label: Primary
span: auto
default: 0
type: switch
section:
label: Section
nameFrom: name
descriptionFrom: slug
list: $/authorname/pluginname/models/modelname/recordfinder_columns_for_model.yaml
span: full
type: recordfinder
custom_fields:
type: nestedform
showPanel: false
dependsOn: section
trigger:
action: hide
field: section
condition: value
form:
fields:
OctoberCMS 3.3.20:
I get next data:
[ string primary => 1, string section => 2, array 'custom_fields' => [] ]
OctoberCMS 3.5:
I get an unpacked array of custom_fields;
[]
The text was updated successfully, but these errors were encountered: