Forms??? How do I add a small form for say registering for a news letter to a page of content?

Events happening in the community are now at Drupal community events on www.drupal.org.
john keohane's picture

Hi all. I'm not sure how to go about this. I need to create a small form for entering an email address. but the form needs to be on the homepage. I've created form pages before but this has me stumped as it needs to be part of the content for the homepage. Any ideas...?

Comments

Well you could use Drupal's

stella's picture

Well you could use Drupal's Form API (FAPI), but I imagine the webform module should do everything you require.

Simplenews

not.used.909's picture

If are registering peple for a newsletter, you could use Simplenews.

It manages subscriptions and the creating and sending of newsletters.

Thanks

john keohane's picture

Thanks guys. Used the form API in the end. It was easier than I thought. still trying to get my head around drupal. I've lots to learn.
:-)

form API in a page

mdshields's picture

Hello guys, I am using the form API which is great. Just trying to figure out how to put it into a basic page.
I created a basic page (using "add new content"), and just wanted to merge the form in there.
Is there a way to do that or do I have to create a brand new template and then hard code the form into the page?

Webform

igzeebihir's picture

I would use the webform module for simple forms...

http://drupal.org/project/webform

Yeah that's not the way to do

stella's picture

Yeah that's not the way to do it. Either use the webform module which takes care of the form API and data storage for you, or create it's own menu item for it by using hook_menu(). Do NOT embed it into a node page.

kewl

denimcowboy's picture

thanks i was having trouble with this too!

Ireland

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: