Provide a $form['#default_triggering_element']

Created on 16 June 2011, about 13 years ago
Updated 14 June 2023, about 1 year ago

To solve issue like #927176: "Enter" key removes file instead of saving node we shouldn't use the first button as the triggering element when none is actually clicked.

I suggest we provide a $form['#default_triggering_element'] property.

To get this working we can add an invisible button at the top of each form.

It might be possible to use a input type="hidden" as the default triggering element. But as mentioned there it doesn't seem to be specified in any standard.

Feature request
Status

Closed: outdated

Version

9.5

Component
Form 

Last updated 1 minute ago

Created by

🇳🇱Netherlands casey

Live updates comments and jobs are added and updated live.
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.

  • 🇺🇸United States smustgrave

    Closing as outdated, as there hasn't been movement in 12 years.

    If still a valid feature request please update the issue summary as things have changed in 12 years and the request/solution I'm sure could be different.

    Thanks!

Production build 0.71.5 2024