[development] #just_before_validation ?
Bèr Kessels
ber at webschuur.com
Sat May 20 08:16:46 UTC 2006
Hi,
I am looking for the following: I want to generate the title of a node from
content in that node.
Hence I need to hook into the node submission on several places.
First: hook_form_alter, to make the title field hidden
Then just *before* validation to capture the node content and fill a title. So
that all possible validation hooks can still run, but that the title has a
value.
Any idea what kind of hook, or #callback I should be looking at?
#validate is not a good option, since I think it is important to run all the
normal validations on that title field. But maybe the trick is to set that
#validate, and inside that callback function fill the title value and then
call all the validation hooks from there? I am personally not a fan of using
validation to cahnge values. Validation is for.... validation.
Also important is, that this needs a POST, because I have to grab info from
that POSTed node.
Bèr
--
[ End user Drupal services and hosting | Sympal.nl ]
CVS onder de knie krijgen:
http://help.sympal.nl/cvs_onder_de_knie_krijgen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.drupal.org/pipermail/development/attachments/20060520/434c531e/attachment.pgp
More information about the development
mailing list