-
Notifications
You must be signed in to change notification settings - Fork 824
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Form field attributes aren’t included in form schema #9124
Comments
Temporary workaround (eg for placeholder attribute): |
I think the way forward for this is in a major release call |
Linked PRs have been merged, they're be released with CMS 6.0.0 |
FormField::getSchemaDataDefaults()
by default returns an empty array for the field’s attributes (third-last item in the below array):silverstripe-framework/src/Forms/FormField.php
Lines 1538 to 1560 in 29a663c
I noticed this when adding a new field to
GridFieldFilterHeader
, any attributes I add to the field go missing as it’s built using the form schema. Workaround is to just use->setSchemaData()
to add the attributes manuallyChanging it toEdit: that won’t work because recursion #9125 (comment)'attributes' => $this->getAttributes(),
has the desired effect.PRs
Kitchen sink CI
The text was updated successfully, but these errors were encountered: