Drupal - CCK or Webforms? - drupal

I've been doing some reading and I'm still not sure which module to use to get the results I want. I'm looking to build a Patient form and when the form is submitted the results show up in a layout. Here's an image example of what I'm looking to accomplish: http://mjyes.com/images/form-example.jpg
If the Patient information needs updating, then I can visit the form again and update any given field and re-submit for updating.
I'll probably need to access the Patient's information through out the web application.

Based on what you've described, you probably want to use CCK. CCK will allow you to create a patient content type, customized with the fields you need.
Webform is primarily for things like contact forms or surveys where the submissions don't become part of the content on the site.

Related

Create moderation for form data

I want to add moderation logic for a form which has name, mail and comment. Now when anyone fills the form and clicks "submit" it should directly be posted to the page. I want to send the content to "admin" and to be published after the content is reviewed. How can I achieve this in Drupal? I'm using Drupal 7.2.
There are many ways to achieve what you want. I guess you are looking for a site-builder approach.
Then you may have a look at the Webform module. Webform lets you build forms and define e-mail addresses to where the submitted data should be send to.
Then there is the Rules module with which you can define a rule that on every form submission automatically a (initially unpublished) node is being created populated with the form values.
And finally you may provide a list of all unpublished nodes built with Views. Maybe you already provide a button "publish" next to each node in the list that triggers the node publication.
Alternatively you may also have a look at moderation modules like Workbench Moderation.
Or have a look at the Flag module which is pretty useful for flagging content according some logic and/or button clicks. For example you can add a flag: approved.

Wordpress custom form advanced

just a quick one, are you aware of any wordpress form plugins that allow me to create a form and depending on which options they select, it will display a certain bit of information that submits to a selected email.
Im trying to achieve a web request form for clients and would like them to be able to fill out information as well as select a check box for a certain amount of questions. For example,"would you like to update your own content?"
if they check this box, i would like the form to render all the information in the form and then depending on which checkbox is selected it will give me a bit of content that is different. im trying to automate a proposal template so it writes all this content in an email so i can quickly do proposals for websites etc.
Yes, gravity forms does this. And it's very easy too.
http://www.gravityforms.com/
It is called 'conditional logic'. You enable this on a field, which will display conditional drop downs which you can choose previous 'multiple choice' questions to base your conditions on.
Think you have to pay for this plugin but you could probably find version 4 as a download somewhere to demo before you buy.
You won't be disappointed.

Drupal WebForm with CCK content types. For anonymous users

I am probably asking a noob question... however:
I have a Drupal site that the customer has a web form where anonymous users can fill in to order some posters (there is 3 to choose from). These are free and at the moment they user just states in the body of a textarea what posters they want.
The site owner wants to now add more posters and now wants the ability to have each poster listed in the web form with a field for quantity next to them.
When the web for is submitted it will post the node title and quantity to the web form along with the required information.
I have researched using UC but it's too much of a eCom solution for such a simple requirement. I also looked at SimpleCart, Flag and Session favorites, all of which aren't really what I need.
So I am looking for a simple way to itterate over all the "Poster" content types, and display them on the webform page with a quantity numerical field to be submitted with the web form for each poster.
Currently I have:
CCK Poster
Title
Image
WebForm OrderPoster
Name
Email
Address
Details
What I am looking for is a page that does the following:
WebForm OrderPosters:
Poster 1 [form qty text input for poster 1]
Poster 2 [form qty text input for poster 2]
Poster 3 [form qty text input for poster 3]
...
Poster n [form qty text input for posters n]
Name
Email
Address
Details
I'd imagine there is a simple way to do this, but I can't seem to find articles of customizing "WebForm" forms. Any help would be much appreciated.
I don't know of any way to programmatically add components to a webform. I've used them a lot in my sites, but if you are going to do something like what you said you have to go the custom module route. If you did want to keep the webform you could program your own form component to do exactly what you want, but docs are scarce for that too. I would start by looking at some of the built-in components to get an idea of what needs to be done and then make my own.
Personally I would implement a custom module to do this. You would need to use hook_menu() and then create a callback to build this form. While building the form you could easily loop through the available posters and create the form elements. The submit function would then save to a database table and if needed, it could also post to a payment gateway when your customer wants people to pay for the posters.

How to create a custom form in drupal

I need help on how to create a 'custom form' using the same fields provided by cck.
Drupal gives you the ability to add fields to 'nodes' and how to theme their output. But I would like to be able to post a data from my own form (that pops-up) and sends data to the drupal database using the same drupal cck.
How do I access the specific form inputs to add data to my content types ? because the default form is kind of 'ugly' and loads on different page(without ajax).
Help would be much appreciated
There are several routes you could go down.
The easier option is to use the Webforms module. While this gives you similar fields to cck, they are not exactly the same, and if you have a module that implements a specific cck field type, it won't be available to webforms.
The second choice is to write your own module using the forms api. This can mean a lot of learning, add it takes time to get up to speed, but ultimately you have total control over how your form will look and behave. The forms api doesn't give you exactly the same fields, but all the tools are there to create them. Sometimes you need to hack open a module to find out haw a specific field is implemented.
A third option would be to use cck itself. You could create a content type and add the field types you want on your form. You would them give users permission to create but not view or edit the content type. The form submissions would them be nodes on your website. This would make me slightly nervous, so make sure all your permissions are correct!
The second part of your question: you can use a theme file to override the appearance of most forms and make them pretty.
James

Is there a customizable form in drupal similar to the contact form?

I need a form to enable user to enter event info in three fields (what, where, and when). Then I would like to be able to present the events in tabular form. I don't know PHP. Does drupal have a module for this purpose?
The content construction kit (CCK) allows you to create content types with custom fields, and automatically produces the forms for those content types. You'll probably also want the date field for the when.
You would use Views to display data as a table.
http://www.drupal.org/project/views
Drupal Form Builder
Will create quick forms for you on the go.
Drupal CCK
This one is a little bit more envolved, but more definitive, common place, and HIGHLY extensible. Here's a nice little tutorial as well.
If you don't want the results (events) to turn into nodes when the user enters the data and submit the form, then you should look into the webform module.
A while back I "demoed" this to my peers by building a "mcdonald's monopoly" tracker that anyone could use to input their pieces and then I setup a view as a block to display the aggregate result for everyone's pieces.
We didn't win anything, but this may be what you are looking for.

Resources