Skip to main content

You should add the link in the form builder, something like the following example:.

$forgot_password_link = \Drupal\Core\Link::createFromRoute($this->t('Password link'), 'user.pass')->toRenderable(); $form['forgot_password_link'] = [ '#markup' => render($forgot_password_link), ];
$forgot_password_link = \Drupal\Core\Link::createFromRoute($this->t('Password link'), 'user.pass')->toRenderable();
$form['forgot_password_link'] = [
  '#markup' => render($forgot_password_link),
];

You should add the link in the form builder, something like the following example:.

$forgot_password_link = \Drupal\Core\Link::createFromRoute($this->t('Password link'), 'user.pass')->toRenderable(); $form['forgot_password_link'] = [ '#markup' => render($forgot_password_link), ];

You should add the link in the form builder, something like the following example:.

$forgot_password_link = \Drupal\Core\Link::createFromRoute($this->t('Password link'), 'user.pass')->toRenderable();
$form['forgot_password_link'] = [
  '#markup' => render($forgot_password_link),
];
Source Link
JurgenR
  • 2.2k
  • 3
  • 19
  • 31

You should add the link in the form builder, something like the following example:.

$forgot_password_link = \Drupal\Core\Link::createFromRoute($this->t('Password link'), 'user.pass')->toRenderable(); $form['forgot_password_link'] = [ '#markup' => render($forgot_password_link), ];