I have been searching all morning and have yet to come across the solution for my problem..
problem is:
I have successfully created a CCK content type using the content taxonomy module (which allows me to use a vocabulary as the content). the user is asked to select his/her preferred cultures. so in simple terms form holding a series of checkboxes which the user merely selects their preferred cultures.
problem comes when I wish to display the selected cultures by that user for them to then sort into their top 5 cultures.
the sorting bit I can do using draggable views. however actually displaying the users selected cultures is something im finding difficult.
sorry for my novice of a question.. but its been one of those days.
You should use relationships.
HOWTO: Views 2 Relationships: http://drewish.com/node/127
User Relationships module: http://drupal.org/project/user_relationships
http://www.drupalforusers.com/content/using-views-2-relationships
Using Drupal's Views Relationships: http://www.drupalove.com/drupal-video/using-drupals-views-relationships
Also you may need this patch: http://drupal.org/node/241078.
Or a module that allows to make backrelationships but it is private.
Related
I want to make site that displays form, and makes user capable to input certain parameters in it. For example, real estate site. Let say I have these fields among others: location, price, size. If user choose to see houses under 100 000$, Drupal has to back node teasers (fields) for houses only under that price.
Now, I wonder how to make Views module start searching when user click submit button, and how to make conditions under which Views search, dynamically dependent of parameters users put into form.
Do I need some additional modules beside Views and Webform modules? Or maybe, I don't need them? Maybe I have to write some php/mysql script that do searching and fetching, but, naturally, I think Views module is build for that kind of circumstances. Thanks in advance!
1) There is an option in Views when you create the exposed filters: "Remember the last selection". This caches the user selection for each Views and when user visits the Views again he will see the previous filters enabled.
2) For better UX you can use Better_Exposed_Filters and Views_Saved_Searches modules. With the first one you have much more options for exposed filters (eg expose as checkboxes) and with the last one users can save their searches and use them later (like bookmarking a url path).
PS. I don't think using the Webform module with views will be useful in order to create personal saved searches. Instead, Views Saved Searches is what you are looking for.
I am new to Drupal. I am working with a preexisting website that has a couple dozen staff bloggers. Some of the bloggers need to have all of their posts migrated out to a database (the CMS they will be imported to is not yet known).
I have looked into a few modules for backups, but they don't seem to have the ability to choose what exactly is exported.
If anyone could give me some advice or direct me to an appropriate module, that would be fantastic!
You can do it easily with Views and Views Data Export modules.
However, you will need to learn a little about Views before making use of the Data Export module. You can follow some quick tutorials. You will not need any coding skills but concentrate on Views UI , Filters and Arguments.
Make a View on node as primary content, and add a filter (or an argument if you want to take the user ID from URL) for User: UID and add fields you want to get exposed as Fields. Then, in the style settings, choose "Data Export". Create a page display and give it a path.
You can also make the form advanced with exposed filters.
I'm very new to drupal however what I'm trying to achieve I assumed would be relatively straightforward but finding any documentation on the subject is proving difficult.
I am creating an ecommerce site using ubercart, i have installed this and all of the relevant modules and have created custom product pages with not much hassle. What I need to do is create a 'blog' that's articles can relate to one or multiple products. I have managed to set up the blog with no issues but I am struggling to find out how I can first of all link the story to a product in the product creation process (i.e. when creating a product I can choose a blog article from a list to form a relationship). I have kind of managed to provide this required relationship using the References module. But I have no idea how I can use this relationship to, for instance dynamicall display a list of products related to the current blog article or vice-versa.
I have previously asked a similar question but an still unable to figure this out.
Many thanks.
If the field is attached to the blog content type then you'll have a list of related products automatically outputted in the field display. If you haven't, go to the 'Manage Display' section for that content type and make sure that field isn't hidden.
The References module is only uni-directional currently so you'd have to code a solution for the other way around yourself (not particularly tricky). Alternatively you could ditch References altogether and try the Relation Module which defines bi-directional relationships between entities.
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
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