summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGábor Hojtsy <gabor@hojtsy.hu>2007-09-25 15:14:37 +0000
committerGábor Hojtsy <gabor@hojtsy.hu>2007-09-25 15:14:37 +0000
commitc9c86ebf8447c0f4ed9d018feca305683c02b42a (patch)
tree8efae64ab41b2765c5f3e033c4e7dff20f78f643
parent5d1c88894979b8e6199a21b237fd12b9229f1fe6 (diff)
downloadbrdo-c9c86ebf8447c0f4ed9d018feca305683c02b42a.tar.gz
brdo-c9c86ebf8447c0f4ed9d018feca305683c02b42a.tar.bz2
#145251 by chx: document that one needs to include the proper 'op' value in arrays passed to drupal_execute() to trigger the right action
-rw-r--r--includes/form.inc2
1 files changed, 2 insertions, 0 deletions
diff --git a/includes/form.inc b/includes/form.inc
index 3c1a3557e..32dd92399 100644
--- a/includes/form.inc
+++ b/includes/form.inc
@@ -191,6 +191,7 @@ function form_set_cache($form_build_id, $form, $form_state) {
* $form_state['values']['name'] = 'robo-user';
* $form_state['values']['mail'] = 'robouser@example.com';
* $form_state['values']['pass'] = 'password';
+ * $form_state['values']['op'] = t('Create new account');
* drupal_execute('user_register', $form_state);
*
* // Create a new node
@@ -199,6 +200,7 @@ function form_set_cache($form_build_id, $form, $form_state) {
* $form_state['values']['title'] = 'My node';
* $form_state['values']['body'] = 'This is the body text!';
* $form_state['values']['name'] = 'robo-user';
+ * $form_state['values']['op'] = t('Save');
* drupal_execute('story_node_form', $form_state, $node);
*/
function drupal_execute($form_id, &$form_state) {