diff options
author | Dries Buytaert <dries@buytaert.net> | 2010-03-04 09:07:27 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2010-03-04 09:07:27 +0000 |
commit | 0f4ec342a16f23b78f1b7731344e431c070b1a80 (patch) | |
tree | c16552dd5a27eb47ad7c5e1528081fe527acdcb2 | |
parent | e5e3d279e299b00890e86f8fa2f4b48ca1ce9948 (diff) | |
download | brdo-0f4ec342a16f23b78f1b7731344e431c070b1a80.tar.gz brdo-0f4ec342a16f23b78f1b7731344e431c070b1a80.tar.bz2 |
- Patch #727126 by jhodgdon: fixed drupal_execute()/drupal_form_submit() documentation.
-rw-r--r-- | includes/form.inc | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/includes/form.inc b/includes/form.inc index c30974cc7..cebdf1546 100644 --- a/includes/form.inc +++ b/includes/form.inc @@ -415,9 +415,14 @@ function form_state_keys_no_cache() { } /** - * Retrieves a form using a form_id, populates it with $form_state['values'], - * processes it, and returns any validation errors encountered. This - * function is the programmatic counterpart to drupal_get_form(). + * Retrieves, populates, and processes a form. + * + * This function allows you to supply values for form elements and submit a + * form for processing. Compare to drupal_get_form(), which also builds and + * processes a form, but does not allow you to supply values. + * + * There is no return value, but you can check to see if there are errors + * by calling form_get_errors(). * * @param $form_id * The unique string identifying the desired form. If a function @@ -440,7 +445,6 @@ function form_state_keys_no_cache() { * For example, the node_edit form requires that a node object be passed * in here when it is called. * For example: - * * @code * // register a new user * $form_state = array(); @@ -450,7 +454,6 @@ function form_state_keys_no_cache() { * $form_state['values']['pass']['pass2'] = 'password'; * $form_state['values']['op'] = t('Create new account'); * drupal_form_submit('user_register_form', $form_state); - * * // Create a new node * $form_state = array(); * module_load_include('inc', 'node', 'node.pages'); |