开发者

rebuild drupal form in ajax-submit?

开发者 https://www.devze.com 2023-03-23 19:20 出处:网络
I\'m trying to build an AJAX-submitted form in Drupal 7.7, which should submit its content and empty itself afterwards. Therefore I added an ajax-handler fu开发者_如何学Pythonnction to the submit butt

I'm trying to build an AJAX-submitted form in Drupal 7.7, which should submit its content and empty itself afterwards. Therefore I added an ajax-handler fu开发者_如何学Pythonnction to the submit button, which calls drupal_get_form() (with the same form-id) and returns the ajax commands to replace the whole form. But for some reason the drupal_get_form-call never returns and instead re-submits the form and redirects afterwards.

Am I doing it wrong?

0

精彩评论

暂无评论...
验证码 换一张
取 消