laravel-form-builder
laravel-form-builder copied to clipboard
Plain form class check in Form
class Form
public function rebuildForm() {
// If form is plain, .....
if (get_class($this) === 'Kris\LaravelFormBuilder\Form') {
That's not right. The plain form class is configurable, kinda:
class FormBuilder {
protected $plainFormClass = Form::class;
So checking for 'is plain form' should check for that class.
But currently the FormHelper
doesn't have access to the FormBuilder
. Even though there is protected $formBuilder;
in FormHelper
, never used, always null
.
- [ ] Move
protected $plainFormClass
to real config - [ ] Remove
protected $formBuilder
fromFormHelper
- [ ] Let
rebuildForm()
check the correct form class