Receiving duplicated values in checkboxes #2507
-
Hi! I'm new working with web dev and I need help with this: Example: I have 5 product and I want to change the 2 first from 0 to 1 the value of $pre_orderable-checkbox, I will get in request :
Instead of this :
So it means that The first , third and fifth will be now 0 and the second and the fourth will be 1. This is the class where "magic happens"
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Change the field name to be an array of predefined keys: TD::make('pre_orderable','Pre Orderable')
->render(fn (Repository $model) => CheckBox::make("pre_orderable-checkbox[$model->id]")
->sendTrueOrFalse()
->value($model->get('pre_orderable'))), |
Beta Was this translation helpful? Give feedback.
Change the field name to be an array of predefined keys: