Pregunta

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

¿Fue útil?

Solución

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.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top