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.
Check out the Prepopulate module.
http://drupal.org/project/prepopulate
It might be what you are seeking.
jns
-----Original Message----- From: support-bounces@drupal.org [mailto:support-bounces@drupal.org] On Behalf Of Vasileios Lourdas Sent: Friday, April 25, 2008 5:28 PM To: Drupal support list Subject: [support] Prefill body textarea at node creation
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. -- # Vasileios Lourdas, # Informatics Engineer, Thessaloniki (Greece) # http://www.lourdas.name -- [ Drupal support list | http://lists.drupal.org/ ]
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.
Thank you Steve and Jim for your suggestions. These tips will get me started.