By fcmisc on
Hi,
Some modules display a box at the top of the page providing the user with info, such as warnings. I frequently get this when my mysql statements are wrong.
What is the function that allows me to throw my own errors, or just present some boxes to give the user some information that is not part of the rendered page?
Thanks,
fcmisc.
Comments
The function is drupal_set_message()
The function is drupal_set_message() and it takes a string as an argument (ex: drupal_set_message('hello world');). In phptemplates this information is displayed by printing $message (done by many themes by default).
using drupal_set_message() on user/edit
I'm using the login_destination module to redirect users to update their passwords when they login for the first time. I'd like to use drupal_set_message() to provide instrutions on the user/edit page. Does anyone know where I put the code so that it's called when user/edit is requested?
A couple of module already exist for that purpose
There are the Help Tip and the More Help module is the download area. I have used the helptip module, it needs configuration but otherwise works fine (I have not used more help, I found it looking up help tip)
Thanks!
Thanks nevets, worked great!