[support] On node submit, going straight to "e-mail page" form
Jonathan Hedstrom
jhedstrom at opensourcery.com
Tue Jun 9 17:01:32 UTC 2009
Neil Coghlan wrote:
> I have an idea for my site but am unsure how difficult it would be to
> implement.
>
> Basically, once a user submits a certain type of content, I'd like to
> redirect them to a page where they can notify their friends/family. I
> use the Print, Mail, PDF module to mail pages to friends, so ideally,
> once a user submits node/123, it would take them to printmail/123 (the
> URL that the module uses to mail pages) with possibly a customised
> message along the lines of "now you've published on our site, let your
> friends know!" or something equally cheesy.
>
> tough to do?
>
You could probably achieve this with an implementation of
hook_form_alter() in a custom module by adding a #redirect to the node form.
http://api.drupal.org/api/file/developer/topics/forms_api_reference.html
To add the customized message, you'd probably also need to add an
additional #submit handler to the node form.
Cheers,
Jonathan
--
Jonathan Hedstrom OpenSourcery
http://opensourcery.com Technology for Good
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: OpenPGP digital signature
URL: <http://lists.drupal.org/pipermail/support/attachments/20090609/f3ed9115/attachment-0001.pgp>
More information about the support
mailing list