drupal6 taxonomy cache, dropdown arrays & webform vs cck questions - drupal

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

Related

Client management page on Drupal 7

I would like to know what is the best way to create a custom page for my client where he can update is content by himself, the simpliest way possible for him, without even entering drupal management.
I would like to create a page with different dropdown list where he can't update a table on a page, only by selecting an item in those and add other dropdown list as well.
For example: he logs in a custom page
Theres a list with different kind of fruits, he choose banana and it automaticaly update a page table and update it with banana.
After that he could also create a new drop down list of vegetables for example, and add different kind in it so he can use it to update the site later. All that done with ajax as well.
I'm very new to drupal and have a couple of php notions, but i don't know where to start, would it be in CCK, Views or Form Api or the three at the same time?
Or is there a module out there doing that kind of thing?
English is not my primary language, so sorry if it isn't very clear.
Thank you very much.
I think what you are looking for is CCK module. You can create a CCK content type and have a field within it called fruits. From the admin interface you can decide what are the values that should be in the dropdown.
You can give the client permission to create a node of the content type. If you think he should be able to edit only the drop down values, make sure you give him the permission to only that field.
You can create a listing page using http://drupal.org/project/views or you can also consider using
http://drupal.org/project/editview
You should take a look at views bulk operations, and try using the "modify node fields" feature which will allow you to perform bulk operations on node fields displayed in a view and then look into roles & permissions which will help you restrict viewing the "View" by role.

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

Better content administration, sort by node's CCK fields?

I was asking myself if there's a better way of sorting content in Drupal.
Right now, when I go to admin>content all the nodes are mixed up. I installed the module "Content administration" (http://drupal.org/project/nodeadmin) and now you can not only filter but also sort them by title, type, author... but that's all.
Is there any good module to improve the content administration a part from the one I mentioned?
For instance, it would be great if I could filter the nodes by their CCk field values.
An easy way to improve the content AI, is to build your own with views and views bulk operations. With it, you can run tasks on many nodes at once, like publish/unpublish and you get all the views filtering / display options you have in any view.
Also checkout http://drupal.org/project/improved_admin - does basically what googletorp suggests for you.

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.

Can CCK take care of my fields for a programatically defined node type in drupal?

Does the CCK api allow me to create a node type, from a custom module, with a bunch of fields that use CCK to store their state? If so can these fields be locked so that users may not alter them, but still allow the user to add more fields to the node type?
Thanks
I think the answer to your first question is "yes" (for Drupal 6, at least, which has elements of the CCK integrated into Drupal Core). I believe the Amazon module does this sort of thing, albeit it with just one field.
I don't think the idea in your second request is achievable, though. This would seem to require field-level permissions' control whilst Drupal only supports module-level permissions' control.
You could add validation code in the GUI which restricts CCK fields being interfered with on your content type. This would not prevent another module getting in there with an axe, though.
You could add checks which restore your preferred CCK settings whenever they detect some unwanted changes.

Resources