You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When rendering a form without $FieldHolder, you can potentially lose important error messages and be stuck debugging a form that seems to 'randomly' redirect back in certain cases.
I propose that we add a flag per FormField that says whether a user has rendered $Message on each form field, and if they haven't, an exception is thrown with the unrendered FormField messages so that the developer knows where they went wrong.
Since this behaviour might not necessarily be what you want in certain cases, there should also be a config flag / property on 'Form' to disable this behaviour. I feel it should be enabled by default because a lot of new developers to Silverstripe get stuck on this and don't realize it's due to them not rendering the $FieldHolder.
I'm happy to do the work and PR, just running the idea by you guys first. Maybe SS 4.0 makes this redundant?
The text was updated successfully, but these errors were encountered:
When rendering a form without $FieldHolder, you can potentially lose important error messages and be stuck debugging a form that seems to 'randomly' redirect back in certain cases.
I propose that we add a flag per FormField that says whether a user has rendered $Message on each form field, and if they haven't, an exception is thrown with the unrendered FormField messages so that the developer knows where they went wrong.
Since this behaviour might not necessarily be what you want in certain cases, there should also be a config flag / property on 'Form' to disable this behaviour. I feel it should be enabled by default because a lot of new developers to Silverstripe get stuck on this and don't realize it's due to them not rendering the $FieldHolder.
I'm happy to do the work and PR, just running the idea by you guys first. Maybe SS 4.0 makes this redundant?
The text was updated successfully, but these errors were encountered: