Closed (duplicate)
Project:
Drupal core
Version:
8.0.x-dev
Component:
block.module
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
6 Apr 2011 at 01:19 UTC
Updated:
29 Jul 2014 at 19:28 UTC
The proposed way to provide a block with a configuration form is hook_block_configure. The problem is that you cannot use AJAX in that form because you do not have $form_state at your disposal. The way to do AJAX-enable a block configuration form in D7 is hook_form_alter().
This simple patch simply passes $form_state to hook_block_configure(), so that you can provide AJAX-enabled forms right there in hook_block_configure(). You can, of course, still use hook_form_alter().
| Comment | File | Size | Author |
|---|---|---|---|
| block_ajax_forms.patch | 1.48 KB | tstoeckler |
Comments
Comment #1
tstoecklerAssigning to me
Comment #3
tstoecklerOops. See #690828: hook_block_configure not AHAH compatible.
Comment #4
DHL commentedI know this post is about D8.
But how to use hook_form_alter() to make Ajax effect in hook_block_configure in D7?