Duplicate submit button on ajax form

Created on 8 December 2022, almost 2 years ago
Updated 13 September 2024, 2 months ago

Problem/Motivation

A single submit button on ajax form renders twice. Button appears in the
(at the bottom) and again in the

Email Denied Message

Steps to reproduce

Create a standard FormBase class and enable ajax for the submit.

$form['actions'] = ['#type' => 'actions'];

$form['actions']['send'] = [
'#type' => 'submit',
'#value' => $this->t('Email Denied Message'),
'#ajax' => [
'callback' => [$this, 'submitModalFormAjax'],
'event' => 'click',
],
];

return $form;

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Closed: won't fix

Version

3.25

Component

User interface

Created by

πŸ‡ΊπŸ‡ΈUnited States vpowner

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.

Production build 0.71.5 2024