Frage

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

War es hilfreich?

Lösung

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.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top