Integration with form elements

Created on 19 May 2021, almost 4 years ago
Updated 7 October 2024, 6 months ago

Problem/Motivation

When making form examples for #3214707: Provide default examples , I encountered a lot of warnings with elements that need preparation callbacks that I guess are not executed when doing a render.

I propose that exampl plugins could have either a "render" or a "form" key.

In the case of a "form" key it will be the form builder service that will prepare the result.

(PS: using a form builder will be impossible because it requires a form class as argument, I just thought about it after creating the issue...)

And I propose to use a form_alter introduced in https://git.drupalcode.org/project/ui_examples/-/merge_requests/1/diffs#... to loop on some field elements to add automatically all declinations (required, disabled, placeholders, etc.)

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Feature request
Status

Closed: works as designed

Version

1.0

Component

Code

Created by

🇫🇷France Grimreaper France 🇫🇷

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024