Problem/Motivation

When YAML forms are attached to a page via an entity reference or a block it would help user experience to allow the form to be submitted using AJAX.

Proposed resolution

Allow YAML forms to be submitted using AJAX

Remaining tasks

TBD

User interface changes

TBB

Development Notes

  • Branch Name: 2757491-submit-via-ajax
  • Commit message: Issue #2757491: Allow YAML forms to be submitted using AJAX

References

Comments

jrockowitz created an issue. See original summary.

jrockowitz’s picture

Issue summary: View changes
jrockowitz’s picture

Drupal AJAX integration is not fully documented and there are some more immediate issues that need to be addressed. So I am going to hold off implementing this feature.

jrockowitz’s picture

Status: Active » Postponed
fenstrat’s picture

Title: Allow YAML forms to be submitted using AJAX » Allow Webforms to be submitted using AJAX
Project: YAML Form » Webform
Version: 8.x-1.x-dev » 8.x-5.x-dev
jrockowitz’s picture

This feature could be handled by the port of the Webform AJAX module to D8

jrockowitz’s picture

Issue summary: View changes
AndyF’s picture

Status: Postponed » Active

Hey @jrockowitz, I'm starting the ball rolling on this. AFAICT there hasn't been a start on webform_ajax 8. Would you prefer me to submit a patch here or there? (:

jrockowitz’s picture

@AndyF Similar to the Webform View Integration module, I think it is perfectly okay to start with submitting a patch. First off, you will most likely get more followers and reviewer within the Webform issue queue.

Personally, I think AJAX integration should be part of Webform core, similar to how Views includes AJAX integration... all you need to do is check the 'Use AJAX' box to ajaxify a View.

Still, I must emphasize that this feature requires test coverage, which is now possible using Drupal's JavaScript testing framework.

I recommended looking at the WebformDialogTrait, which handles how admin and element setting forms are ajaxified within modal dialogs. In theory, you might be able to write a trait that enables Ajax support for ANY entity form. At the very least, the trait could support AJAX validation.

Finally, you should see if any of your work could be applicable to the Examples module.

Lastly... thanks.