File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
app/Library/CrudPanel/Traits
resources/views/crud/fields/inc Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -268,7 +268,7 @@ protected function makeSureSubfieldsHaveNecessaryAttributes($field)
268268 $ subfield = ['name ' => $ subfield ];
269269 }
270270
271- $ subfield ['parentFieldName ' ] = $ field ['name ' ];
271+ $ subfield ['parentFieldName ' ] = is_array ( $ field [ ' name ' ]) ? false : $ field ['name ' ];
272272
273273 if (! isset ($ field ['model ' ])) {
274274 // we're inside a simple 'repeatable' with no model/relationship, so
Original file line number Diff line number Diff line change 99 // if the field is required in any of the crud validators (FormRequest, controller validation or field validation)
1010 // we add an astherisc for it. Case it's a subfield, that check is done upstream in repeatable_row.
1111 // the reason for that is that here the field name is already the repeatable name: parent[row][fieldName]
12- if (! isset ($field [' parentFieldName' ])) {
12+ if (! isset ($field [' parentFieldName' ]) || ! $field [ ' parentFieldName ' ] ) {
1313 $fieldName = is_array ($field [' name' ]) ? current ($field [' name' ]) : $field [' name' ];
1414 $required = (isset ($action ) && $crud -> isRequired ($fieldName )) ? ' required' : ' ' ;
1515 }
You can’t perform that action at this time.
0 commit comments