I want a subscribe box to capture name & email address how?

cbm - April 21, 2008 - 06:46

I have a CCK form with the name and email address but I want it in a block so that I can put it in the right hand column of many pages. I just want to capture the name and email address and then email the details to my specified email address when they press submit.

I want Name:
Email address
Submit button
in a block

It sounds real simple but I can't figure out how to do it.

Thanks
Carol

views may be your answer

hollybeary - April 21, 2008 - 06:53

I'm no drupal pro by any means, still really new, but it sounds like you could use views to do this. If you have the views module installed, you can create a new view which provides a block. then in the fields section just tell the view what fields to use, that would be the name and address fields that I'm guessing you created. ooh, also I've discovered that under the fields section you need to make sure node: published is selected, and if you're using a custom content type also select node: type and choose your content type in the list that shows up. Hope that makes sense!

Answers yet?

jhcannon - May 1, 2008 - 02:18

Carol -

Did you get this working? I'm trying to do something similar and haven't found a solution.

Janet

Email and Name Subscribe Capture Box

sayanthing - April 28, 2009 - 18:20

Is there or is there not a solution for this yet?

If so, please explain.

I need a way to capture email addresses, first name and last name.

Thanks

Very simple

mrtoner - April 28, 2009 - 23:15

Don't bother using CCK. Just paste your form code into a new block and configure the block to appear when or where you want it. Doesn't matter if you're using an autoresponder like AWeber or a simple FormMail form, the form code goes into the block.

Alternative Solution

ccdoss - July 30, 2009 - 23:57

WorldFallz helped me with a solution:
You'll need these installed:
CCK
Workflow_ng
formblock
tokens

I'm using Drupal 5. I'm assuming there's a formblock equivalent in D6.

Steps:
1. Create a content type that contains fields for firstname, email, whatever else they'll fill out. We'll call it infocapture
2. Edit the infocapture content type and click the "Enable data entry from a block" checkbox
3. Go to Workflow, and create a new rule. The rule is "when new content has been created"
4. Add a condition for the rule for "when content type is infocaputre"
5. Add an action that says, "Send e-mail to arbitrary address" Contents of e-mail can be customized with the recently entered name, and sent to recently entered e-mail address by using tokens (i.e. [node:field_infocapture_email-email] as recipient], [field_infocapture_firstname] in body of email)
6. Do whatever else you need to happen when they submit (e.g. redirect to thank you page, add to a table, or whatever else workflow_ng offers)
7. Go to blocks, and add infocapture Form block to whatever pages you want it to appear on.

Since this is a new content type, you can of course find it when searching for content. You may want to also use automatic node titles, so you can hide the title field on the form (probably doesn't make sense to have to enter a title to submit a form)

It is working great for me right now. The only drawback is you'll need a different content type for each type of form you want to use in this manner since the actions are keyed to the creation of the content, and not the page it's filled out on. I hope this helps you because I've been fighting this thing for the last month as you can see here: http://drupal.org/node/506426

 
 

Drupal is a registered trademark of Dries Buytaert.