Good morning all(London time),

can someone tell me I can print output from an sql statement( or any kind of output ) to a node from a submit hook ?

All my attempts yield no results no matter what I am printing.
the only outpur i get is whatever I put in drupal_set_message.

Comments

josephcheek’s picture

i'm running into the same issue, ie:

hook_submit() populates $data obj

i want to display theme('mytheme', $data) from inside hook_submit (ideally, without displaying the form again, but that's of lesser importance).

how do i get this?

Joseph Cheek, Founder
CEO and Drupal Architect
The ZDS Group, Salt Lake City, UT, USA
https://zds.group/
Drupal consulting for media, publishing, and government

nevets’s picture

hook_submit() is only meant for processing the submitted node. As noted you can use drupal_set_message() which will print to the message area.

yasir farooqui’s picture

Can you please explain what you exactly need to do, may be there is some other way to accomplish what you need.

josephcheek’s picture

display themed output based on a query form -

user enters query data on a form
user submits form
drupal spits back the data (themed)

there's too much to spit back in drupal_set_message and that doesn't allow for theming.

it's easy to populate the $data object in hook_submit, but how do i get it to *show* the data?

Joseph Cheek, Founder
CEO and Drupal Architect
The ZDS Group, Salt Lake City, UT, USA
https://zds.group/
Drupal consulting for media, publishing, and government