Skip to main content
2 votes

Revolution slider issue with AjaxResponse

JsonResponse::create() was deprecated and is in the current Symfony version no longer available. It did not added any features other than that you need now an extra pair of brackets for daisy-chaining:...
4uk4's user avatar
  • 101k
2 votes

Loading webform in modal is too slow

The core team is working on cacheable Ajax requests. The first project using it is Views. Modals might be next. Until then you could deliver the hidden webform together with the cached page and unhide ...
4uk4's user avatar
  • 101k
1 vote
Accepted

Getting menu linkset items

As per the documentation, the endpoint is at /system/menu/[menu system name]/linkset with no /jsonapi prefix (as the routes are provided by the System module, not the JSON API module). So for a menu ...
Wongjn's user avatar
  • 146
1 vote

Rendering for AJAX

This is how I got it to work. Thanks to Angrytoast on Slack for the pointer! public function paginateListing(Request $request) { $rc = new RemindersController(); \Drupal::service('...
Cy Jobes's user avatar
1 vote
Accepted

Why is my message not showing for anonymous user?

It was drupal_flush_all_caches() that was the reason of message not showing. Once removed, everything works as expected.
gbmapo's user avatar
  • 1,086
1 vote

Can't access data posted from Dialog.ajax to dialog box

You have to replace the data key with submit. Drupal.ajax() transfers the submit key to the data key of $.ajax() but ignores a data key already set: var exportActionDialog = Drupal.ajax({ dialog: ...
4uk4's user avatar
  • 101k
1 vote

How to access validated values after AJAX callback when fields are nested in a container?

Ultimately, my issue was caused by my use of #limit_validation_errors on my button (something that I had very unfortunately omitted from my original question's example code). My example code in the ...
sonfd's user avatar
  • 7,926
1 vote

How to access validated values after AJAX callback when fields are nested in a container?

In the first Ajax request fired, the form is rebuilt with empty values and should return exactly the same form build as the original build. The only difference is that the raw input data is present, ...
4uk4's user avatar
  • 101k
1 vote

Proper way to get input field value with AJAX

So, you can provide not raw and validated way – Otto Matik The proper & safe way is to get them using $form_state->getValue('field_name') $field_source_values = $form_state->getValue('...
No Sssweat's user avatar
  • 31.4k
1 vote

How to display more than 10 items in link widget autocomplete?

There is an issue on Drupal.org to extend link widget to have limit and operator settings the same way as for entity reference autocomplete widget https://www.drupal.org/project/drupal/issues/3341689#...
Artem's user avatar
  • 11

Only top scored, non community-wiki answers of a minimum length are eligible