Open ukeloop opened 2 years ago
Bugs when modding multiple times with multiple.
multiple
https://github.com/kristijanhusak/laravel-form-builder/issues/305 related bugs.
$options = [ 'choices' => ['en' => 'English', 'fr' => 'French'], 'choice_options' => [ 'wrapper' => ['class' => 'choice-wrapper'], 'label_attr' => ['class' => 'label-class'], ], 'expanded' => true, 'multiple' => true ]; $this->plainForm->add('test', 'choice', $options); echo $this->plainForm->test->getName(); // test var_dump($this->plainForm->test->getOption('tmp.multipleBracesSet')); // Null $this->plainForm->modify('test', 'choice', [ 'rules' => 'required', ]); echo $this->plainForm->test->getName(); // test[] var_dump($this->plainForm->test->getOption('tmp.multipleBracesSet')); // true $this->plainForm->modify('test', 'choice', [ 'rules' => 'required', ]); echo $this->plainForm->test->getName(); // test var_dump($this->plainForm->test->getOption('tmp.multipleBracesSet')); // true
I think codes of modding name should move to render method and remove side effects.
render
https://github.com/kristijanhusak/laravel-form-builder/blob/735c258e3ac3e524226eee5d898aec07e4812594/src/Kris/LaravelFormBuilder/Fields/FormField.php#L293-L296
The choice type is broken is several ways. All ParentType fields are somewhat broken. I'm starting v2 without it.
choice
ParentType
I have feeling #705 might resolve that issue
Bugs when modding multiple times with
multiple
.https://github.com/kristijanhusak/laravel-form-builder/issues/305 related bugs.
I think codes of modding name should move to
render
method and remove side effects.https://github.com/kristijanhusak/laravel-form-builder/blob/735c258e3ac3e524226eee5d898aec07e4812594/src/Kris/LaravelFormBuilder/Fields/FormField.php#L293-L296