How to make drupal submit form using ajax?

I have a custom module in which I submit a form using drupal submit. those. using the mymodule_submit () function. I want ajaxify to send this using jquery. What are all the prerequisites for ajaxifying in drupal? how to return values ​​and all? someone please help. thanks in advance

+3
source share
3 answers

Several high-level concepts are important:

  • do it through api forms. technically you can get around this and write your own form tags (in plain HTML), but this brings more problems than their value.
  • hook_form_alter()
  • ajaxified , AHAH. , Drupal AHAH : .
+1

:

  • : iframe "target" iframe. 2 javascript .

  • : JQuery, , .

+1

http://drupal.org/project/examples

  • You can reference the sample module. It contains various types of ajax forms.
0
source

Source: https://habr.com/ru/post/1754759/


All Articles