Radio button with formbuilder -> Class "App\Http\Controllers\Twill\Option" not found
Hi, I'm trying to add a radio field in Twill 3 formbuider, as described on https://twillcms.com/docs/form-fields/radios.html
But I'm facing an "Class "App\Http\Controllers\Twill\Option" not found" error
Whats wrong, could not find any hints in the docs
5 Replies
You should import the class with "use A17\Twill\Services\Forms\Option;" at the beginning of your file.
You should do this with every class you use.
@luciano.mizra I already imported "use A17\Twill\Services\Forms\Option;" - but its not working
You missed "Options" in plural, there are 2 different classes. If you are using Visual Studio, it should highlight in red the classes that you didn't import.
Another thing, do not use multiple "$form->add"; you should use "addFieldset" instead: https://twillcms.com/docs/modules/form-builder.html#content-fieldsets
@luciano.mizra awesome - thank you so much!!