Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By tlito on
Hello webmasters! I'am searching how to remove token browser for admin when sending message in module privatemsg. The Token Browser makes page load very slowly!
How to remove this from form_id=privatemsg_new ?
I tried my own privatems_remove_token but does not work:
function privatemsg_remove_token_form_alter(&$form, &$form_state, $form_id) {
if ($form_id == 'privatemsg_new') {
unset($form['#token']);
}
}
Comments
Try this