New answers tagged ajax
3
votes
AJAX in a plugin form results in "The specified #ajax callback is empty or not callable."
Thanks to Clives link, for reasons I am not 100% on the configuration forms for a Context plugin the AJAX callback needs to do this:
/**
* Trigger form rebuild.
*
* @param array $form
* @...
0
votes
How to refresh and reload (with ajax?) order checkout panes and order calculation independent from commerce cart refresh (e.g. billing address change)
So you want to refresh some content in the page that's not part of the checkout form? Basically, this can be done using an Ajax callback and one or more Ajax callback commands:
https://www.drupal.org/...
0
votes
How to add an unique wrapper id to a widget element?
If you have multiple wrappers on the same page you can't rely solely on Html::getUniqueId. You need to add as much predictable information as available.
For example in a single field widget element ...
1
vote
Accepted
Overriding Drupal.ajax.prototype is not working
There are two javascript objects:
Drupal.ajax
Drupal.Ajax
You have to override the prototypes in Drupal.Ajax. For each Ajax object declared in Drupal settings an instance of it will then be stored ...
0
votes
Can I add elements to a field widget with AJAX?
The point is, you can't modify Drupal's internal form structure in an Ajax callback. So you'll need a submit handler, either for the field or for the complete widget, do the form modifications there ...
Top 50 recent answers are included
Related Tags
ajax × 2482forms × 987
7 × 831
8 × 452
javascript × 389
views × 339
entities × 184
nodes × 103
theming × 84
commerce × 73
webforms × 72
users × 57
taxonomy-terms × 57
files × 53
6 × 47
hooks × 43
chaos-tool-suite × 43
blocks × 40
routes × 40
paging × 36
search × 35
9 × 28
database × 25
navigation × 23
media × 22