Skip to main content
Tweeted twitter.com/#!/StackDrupal/status/285189228734869504
edited tags; edited tags
Link
avpaderno
  • 97.9k
  • 15
  • 164
  • 284

I have a simple Drupal Module setup which has a single textbox.

I can return what was typed in the textbox using function firstmodule_form1_submit($form, &$form_state) { drupal_set_message(t("The user is $username"));drupal_set_message():

function firstmodule_form1_submit($form, &$form_state) {
    drupal_set_message(t("The user is $username"));
}

However echo $username;echo $username; will not work for me, nothing is printed. How can I return results without using drupal_set_messagedrupal_set_message()?

I have a simple Drupal Module setup which has a single textbox.

I can return what was typed in the textbox using function firstmodule_form1_submit($form, &$form_state) { drupal_set_message(t("The user is $username"));

However echo $username; will not work for me, nothing is printed. How can I return results without using drupal_set_message?

I have a simple Drupal Module setup which has a single textbox.

I can return what was typed in the textbox using drupal_set_message():

function firstmodule_form1_submit($form, &$form_state) {
    drupal_set_message(t("The user is $username"));
}

However echo $username; will not work for me, nothing is printed. How can I return results without using drupal_set_message()?

Source Link
h00j
  • 213
  • 1
  • 2
  • 7

How do I print results after submitting a Drupal form?

I have a simple Drupal Module setup which has a single textbox.

I can return what was typed in the textbox using function firstmodule_form1_submit($form, &$form_state) { drupal_set_message(t("The user is $username"));

However echo $username; will not work for me, nothing is printed. How can I return results without using drupal_set_message?