Drupal form ahah element, problem with empty $_POST


drupal_get_form() saves the $_POST array into $form['#post'], I think.

if you want to look at how poll module adds choices, have a look at poll_choice_js(), which doesn't use drupal_get_form(), but does the building itself. It helped me understand the ahah process.

Tags: PHP / Drupal / Ahah

Similar questions

D8 | submitForm | Get the $_POST - vars via $form_state or via \Drupal::request()?
On an regular sumbmitForm function, should I fetch the user input via \Drupal::request()->request->get... or is $form_state->getValues(); the better (more saver) way? thx
Passing $_POST data from page to page in Drupal
Does anyone know how to transfer $_POST data (HTML form data) from one page to another in Drupal? I have two PHP pages I'm including in two different Drupal nodes, but I can't pass POST data between them. Is there an easy way to do this?
Drupal 7 - undefined variable _POST error in export_ui
Our Drupal 7 site has suddenly begun generating this error warning: Undefined variable: _POST in require_once() (line 1 of /home/website/public_html/sites/all/modules/ctools/plugins/export_ui/ctools_export_ui.class.php). We hadn't made any changes or updates prior to this happening, which is why it is puzzling, if not worrying. What is also puzzlin...
How can I get $_POST data in a callback?
I've implemented hook_menu roughly as follows: I want to be able to post data to this url. So says $_POST is the following array: How can I access $_POST['data1'] and $_POST['data2'] inside the callback? Directly accessing $_POST seems to not work (it's var_dumped as empty).
How to set a $_POST var value as default value for a textfield webform component?
I need to set a $_POST variable value as the default value for a textfield webform component using Webform 4 In the Default Value field I filled with %post[my$_PostVar] but is not working. update: it seems like Webform 4 lost the %get and %post tokens comment-6337368 any thoughts... @googletorp I installed the Availability Calendars module. This mo...
Grabbing $_POST data
A quick summary of where I stand right now: We have a low traffic site here that was redone in Drupal about 8 months ago, before I was in the picture. An external design firm sold the owners on the technology as a way to enable non-programmers to update site content easily. Unfortunately, they did it wrong - they built our theme in-place over the B...

Also ask

We use cookies to deliver the best possible experience on our website. By continuing to use this site, accepting or closing this box, you consent to our use of cookies. To learn more, visit our privacy policy.