Skip to content
Snippets Groups Projects
Verified Commit d06b0a8f authored by Alex Pott's avatar Alex Pott
Browse files

Issue #2747273 by quietone, mayurjadhav, talhaparacha: Example given on...

Issue #2747273 by quietone, mayurjadhav, talhaparacha: Example given on FormBuilder::submitForm API Page is not working
parent 08322e88
No related branches found
Tags 5.5.12
Loading
This commit is part of merge request !1581. Comments created here will be created in the context of that merge request.
......@@ -138,15 +138,11 @@ public function rebuildForm($form_id, FormStateInterface &$form_state, $old_form
*
* For example:
* @code
* // register a new user
* // Set the administrator role to 'content_editor'.
* $values['user_admin_role'] = 'content_editor';
* $form_state = new FormState();
* $values['name'] = 'some-user';
* $values['mail'] = 'someuser@example.com';
* $values['pass']['pass1'] = 'password';
* $values['pass']['pass2'] = 'password';
* $values['op'] = t('Create new account');
* $form_state->setValues($values);
* \Drupal::formBuilder()->submitForm('user_register_form', $form_state);
* \Drupal::formBuilder()->submitForm(RoleSettingsForm::class, $form_state);
* @endcode
*
* @param \Drupal\Core\Form\FormInterface|string $form_arg
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment