Can someone please guide me through the steps in creating a node as a webform using CCK module. I dont want to use the webform module since I am unable to save the data which I want to use to display on another page.

Comments

webkenny’s picture

Create a Custom Content Type. Use CCK to create the form you want to store, set the default behavior to unpublished (so it doesn't show up on your website), and then use a module like Workflow-NG (w/ Triggers) to trigger and email to be sent to you when the form is filled out. Also, worth mentioning from the webform project page:

Submissions from a webform are saved in a database table and can optionally be mailed to a nominated e-mail address upon submission. Past submissions are viewable for users with the correct permissions.

Kenny S.
Developer by day, entertainer by night.
www.webkenny.com

Proud member of the CommonPlaces E-Solutions team.
www.commonplaces.com

Kenny S.
Follow me on Twitter

WorldFallz’s picture

see Getting Started with CCK which is available via the "Documentation" link on the cck project page.

===
"Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime." - Lao Tzu
"God helps those who help themselves." - Ben Franklin
"Search is your best friend." - Worldfallz

henrys212’s picture

I looked through the documentation and it doesnt mention any type of field that I can create that will allow users to enter data that will go into a database.

WorldFallz’s picture

All cck fields are stored in the database. The only exception I know of, is the computed field cck field which allows you to decide whether or not to save the data in the db.

===
"Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime." - Lao Tzu
"God helps those who help themselves." - Ben Franklin
"Search is your best friend." - Worldfallz

henrys212’s picture

When I create a text using CCK I can add data while creating a node, but what if I want to node to appear as a form where you can go to the site and just fill out the qustionaire and use that data for otehr nodes

webkenny’s picture

I really think Webform is the way to go still on this.

Kenny S.
Developer by day, entertainer by night.
www.webkenny.com

Proud member of the CommonPlaces E-Solutions team.
www.commonplaces.com

Kenny S.
Follow me on Twitter

ccoletta’s picture

It's such a hassle to define a node type 'whatever' in CCK and then create a webform to dynamically create an instance of 'whatever.' Right now, I'm making sure that for each webform field, the Field Key (located in Advanced Settings) matches the field name for the CCK defined fields that we use in our new node type. We also have to make sure that if a field is a 'select' field, the option values match between CCK field and webform field. We then will use the Advanced Processing script area to pull the names of the fields by getting the keys to the $form['submitted']['general_information'] array. We then iterate over the keys in the array to build up a new $values Array as shown here, and use drupal_execute() to create the new node.