Closed FR6 closed 1 year ago
I like the idea of autoloading a view. Should be fairly simple to implement. Note, that you can already change a view and use the form group by either adding a view
property to the field's config in the form blueprint or by creating a form component and overriding it there.
Here is some context:
If I have a form group with multiple fields and want to overwrite a specific field, I can't use
@formGroup('mygroup')
and have to use@formField
for all fields just to overwrite one field view:A nice feature would be that a view field could be autoloaded if the file with the name of the field exists. ex.:
fields/field2.blade.php
This way we could still use@formGroup('mygroup')
and just by creating the filefields/field2.blade.php
we would be able to overwrite it.To prevent conflict with names, we could use a specific filename syntax:
fields/field2--field.blade.php
(or anything else)Let me know what you think.