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

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.

Related

Add custom form data to Drupal module without using CCK fields

Iam very new to Drupal 7 so bear with me. I have created a jQueryUI drag and drop interface with JQueryUI tabs. My problem is i cant find the correct hook to add this custom interface to the admin interface. Like so (mockup) http://onlinemedia.rmcad.edu/sandBox/screenshot/screen-shot.jpg
All the examples I find are using CCK fields. CCK fields are great but they dont have this kind of custom functionality I want or does it?
Any help would very much be appreciated.
J
cck is drupal 6, not 7. to add to the node creation form you could use hook_form_alter or hook_form_ID_alter.
Check the form api documentation to get an idea of how to add stuff to the form object in either of those hooks.
From your mockup I understand you intend to add this drag&drop interface to a content-type.
If that's the case, I'd recommend you to add the appropriate fields first. Those would help storing the data in Drupal way, once the node is saved.
Once you are satisfied with the fields collecting the data you need, create a module and use hook_form_FORM_ID_alter hook to integrate your "interface", the presentation layer by altering those fields.
If you don't want to add CCK/Field components to store your data how about you create your own database table and store your custom data in there?
This approach is a long one but I have used it to great effect on a very big and complex project.
You will need a custom module with an install script which contains the details of your custom database table.
Forgive me but I don't remember the hook for altering a node-edit-form but that is where you input the code which implement your drag-'n'-drop elements.
Then, you could save the settings altogether when the node-edit form is submitted but I think it's probably better to implement some AJAX to save the settings to your custom database table. So, when a component is dropped into it's final resting place, you use AJAX to save that information to the database.
When a user comes back to edit that page, you simply load your custom settings and apply them to the drag-'n'-drop features and their previous configuration(s) would be visible to them.
I do hope that makes sense and it helps you.

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 - CCK or Webforms?

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.

drupal6 taxonomy cache, dropdown arrays & webform vs cck questions

1.is taxonomy do caching ? i do a form that user needs to fill his personal infomation and that include a street name, i wonder how to do it, in taxonomy or in cck text field... what is better?
what is the best way to do a form dropdown options of known-non changing options? like choose color:
red,green,blue.orange,gray ... should i use function and call to array? variable_set/get()? taxonomy vocab?
if i do a form for user that will not send to email its just need to add a node or stuff like that, is webform is a better alternative to the cck module?
taxonomy does no caching afaik. To have adress etc info for user i 'd use profile module in core. (you use d6 or d7?) ,
to 1. simple list of non-chaning option which does not need to maintained elsewhere (db/file) you use cck text field and provide values to choose from. Of course for many values, a cck taxonomy field is nice , because there are good import modules (taxonomy_csv and _xml)
question 2 i find hard to understand, pls elaborate a bit
Taxonomy isn't cached. It is also not really the best choice for entering addresses, CCK is perfect for that. If this data isn't going to be content Webform is ever perfecter :)
The benefit of Core+CCK for form based data collection is you can make nodes out of it, which means you can do anything that you would do with a node to the data you collect. Query, Display, Rules on it, whatever.
The advantage to Webform...is that that it's not turned into a node, as such it's more specialized for collection of information such as surveys, questionnaires, contact forms, etc and there are plenty of integration modules for webform to help you see/use your data in cool ways.
Re your questions:
1) CCK Text/Select - OR - the equivalent in Webform
2) Core & CCK, you cannot add site content with Webform
Cheers

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

Resources