[support] Prefill body textarea at node creation

Steve Edwards killshot91 at comcast.net
Fri Apr 25 21:38:49 UTC 2008


Couldn't you do something simple with hook_nodeapi() where $op = 'view' 
and add the text you want to the node at that point?

To make that into a module, you would just need to create the admin 
page, write the submit and validate functions, and then get the data 
from the database and add it when the node is being viewed.

Just my $.02 worth.

Steve

Vasileios Lourdas wrote:
> Hi,
>
> Is there a module that has functionality similar to contemplate, but instead 
> of modifying the teaser/body after the node creation and during the node's 
> display, the body textarea is prefilled with the text of my choice? What I 
> need to have is when a user visits the node/add page, the body textarea must 
> be prefilled with text that has been set somewhere in the administration 
> area. For this particular application, this text will be a pair of signatures 
> and since there will be a number of nodes using these signatures, I figured 
> out that a good solution was to have the body textarea prefilled with the 
> appropriate html snippet. It will be the user's preference to keep it or 
> delete it.
>
> I hope that makes sense.
>   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20080425/0b87392b/attachment.htm 


More information about the support mailing list