聘我网

新概念招聘3.0

drupal是如何处理表单提交的?

vote up0vote downstar

没看出名堂劲来,是个什么过程?

 

1 个答复

vote up0vote downcheck

一般都是由drupal_get_form调用的:

  1. Starts the entire form-building process by getting the $form from the builder function
  2. Translates the $form['name'] items into actual form elements
  3. Performs any validation and "clean-up" that needs to be done, and calls custom validation functions if declared
  4. Submits the form if a submit function is declared, and the form has been submitted
  5. Calls any custom theming functions that have been declared
  6. Returns an HTML string which contains the actual form. (source)

其中的submit function一般是[form_id]_submit,更多细节参考includes/form.inc

链接

您的回答





不是您要找的问题? 浏览其他含有标签 的问题或者 自己问个.