Closed (fixed)
Project:
Visitor Actions
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 May 2014 at 12:15 UTC
Updated:
19 Jun 2014 at 18:50 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
eshta commentedI'm attaching a patch that adds a listener into the Drupal ajax eventResponse method. While the documented approach to work before a ajax form submission is to use beforeSubmit - this does not provide access to the event object that is expected by subscribers to actions.
Comment #2
katbailey commentedReally helpful snippet from dreditor (it's the closing brace for the ajaxed.eventResponse function definition):
This will sound totally anal, but there should be a semi-colon here, and this will help clarify that it's not the end of an if or for statement (I got confused and thought that the return; would be executed even if you hadn't found the form id in question.
Otherwise this is great!
Comment #3
eshta commentedCommitted with additional semi-colon for clarity.
Comment #5
eshta commentedFor completeness sake, however, we really should indicate that a server-side form submission is the correct visitor action to use for a Drupal AJAX form. Otherwise, the action is fired for the submission/validation and not just when the form is successfully submitted. Perhaps we need clearer terminology for the types of form submission actions.