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
If the form “actions” FieldList contains a CompositeField as the first child, Form::defaultActions() will cause an error if the user submits the form without clicking an action button.
This will return the CompositeField, which then causes an error on submission when this code is reached, as actionName() doesn’t exist in CompositeField:
Affected Version
4.0 - 4.8
Description
If the form “actions”
FieldList
contains aCompositeField
as the first child,Form::defaultActions()
will cause an error if the user submits the form without clicking an action button.silverstripe-framework/src/Forms/Form.php
Line 1705 in ecd58cb
This will return the
CompositeField
, which then causes an error on submission when this code is reached, asactionName()
doesn’t exist inCompositeField
:silverstripe-framework/src/Forms/FormRequestHandler.php
Line 185 in ecd58cb
Steps to Reproduce
Wrap your form action(s) in a
CompositeField
, e.g:Then submit the form without clicking the action button, e.g. with JS console:
You should see the following error:
The text was updated successfully, but these errors were encountered: