Question

what is the difference between

     print drupal_get_form('user_register');

and

    return drupal_get_form('user_register');

I am a newbie in drupal... I would be thankful to any explanation

Was it helpful?

Solution

in your callback if you write print drupal_get_form('form_id') then drupal prints the form in the callback, but if you write return drupal_get_form('form_id') then you must catch the returned html in a variable and then print the variable which contains the html of the form.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top