[development] Retrieving form values during intial form rendering

Peter Wolanin pwolanin at gmail.com
Fri Mar 30 22:28:25 UTC 2007


I'll agree with Mark here- I've used this trick a few times.

Take a look at how node previews are generated.

-Peter

 ----------
From: "Mark Fredrickson" <mark.m.fredrickson at gmail.com>
To: development at drupal.org
Date: Fri, 30 Mar 2007 17:19:57 -0500
Subject: Re: [development] Retrieving form values during intial form rendering
I think you want to research '#button' and '#after_build'. '#button'
will send you form values without a full submission. '#after_build'
will allow you to do something with the built values (node.module uses
#after_build to prepend the rendered preview version)

You may have to supply a '#name' element for your button so that it
doesn't get stuck in 'op'. I'm a little rusty on that point.

Cheers,
-Mark


More information about the development mailing list