use-ajax-submit does not includes core/jquery.form library to the form

Created on 25 July 2017, over 7 years ago
Updated 7 January 2024, 12 months ago

Problem/Motivation

I want a form to be ajax submitted. As per the docs, I added class use-ajax-submit to the submit button of the form. The ajax submit is working if the page has the admin toolbar, but for users who cannot see the admin toolbar, for them it throws error:

drupal_ajax: ajax.$form.ajaxSubmit is not a function

I had to add core/jquery.form and core/drupal.ajax libraries to the form, to make it work.

Proposed resolution

Libraries core/jquery.form and core/drupal.ajax should be added by itself if use-ajax-submit class is added to the submit button.

Remaining tasks

N/A

User interface changes

N/A

API changes

N/A

Data model changes

N/A

📌 Task
Status

Needs work

Version

11.0 🔥

Component
Documentation 

Last updated 1 day ago

No maintainer
Created by

🇮🇳India subhojit777

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