Add #element_submit and #limit_element_submit just like #element_validate and #limit_validation_errors

Created on 19 October 2016, about 8 years ago
Updated 4 September 2024, 4 months ago

Problem/Motivation

For certain usecases, especially embeddded forms inside forms, you want to fire submit handlers similar to the way validation can be done on every element.

Proposed resolution

A typical usecase if inline entity forms. You have a form with multiple subentity forms in there. For each, you want to be able to have an easy way to just submit one of the entities inside. #element_submit allows you to do that.

On top of that, once you have more than one subform for example, you also want to be able to limit the possible elements you want to submit. Just think of a form with two embedded entity forms, each with its own submit button. On every Submit button, you want to just validate and submit their corresponding form elements. Therefore this patch introduces #limit_element_submit, similar to #limit_validation_errors.

Remaining tasks

User interface changes

None

API changes

Two new FAPI Element properties
#element_submit
#limit_element_submit

Data model changes

None

Feature request
Status

Needs work

Version

11.0 🔥

Component
Form 

Last updated about 2 hours ago

Created by

🇩🇪Germany dawehner

Live updates comments and jobs are added and updated live.
  • Needs backport to D7

    After being applied to the 8.x branch, it should be considered for backport to the 7.x branch. Note: This tag should generally remain even after the backport has been written, approved, and committed.

  • Needs change record

    A change record needs to be drafted before an issue is committed. Note: Change records used to be called change notifications.

Sign in to follow issues

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