By i25 on
I need to add a field to a CCK content type for a dropdown field with defined choices. When adding fields to the content type, I don't have the option for any kind of select fields like a dropdown field. I only have Decimal, File, Float, Integer, Text. I do have the webforms module installed, and when adding form components to it, I have the choice to add Select fields. Why don't I have this choice for adding new CCK fields, and how can I add it? I've googled this topic and I have not yet found anything definitive. Thanks.
Comments
CCK dropdown list field
You'll have the select-list field choice after you select text as your cck field type. Then you'll need to add the text you want to have in the list.
After I select Text as the
After I select Text as the field type, my only choices are Text field and Text area. I don't have an option for select.
Enable the "Option Widgets"
Enable the "Option Widgets" module (part of CCK) and you should be good to go.
Great... That was easy.
Great... That was easy. Thanks.
Same problem but option widgets is enabled
The only option I get for a dropdown list is via integer not text. I'm stumped!
Enable the Text module
Is the Text module (part of CCK) enabled?
Yep, enabled
The only aspect of cck disabled is filefield meta. This isn't a pressing issue, I'm using taxonomy instead, but its frustrating nevertheless.
previously filled entries!
i want the dropdown list to contain previously filled up contents!
the page is actually of students' college entries!
so i want him to check if any other student from his college has filled up this form and if there is such previous entry, he can simply select it!
this is to avoid multiple entries of the same college! fr e,g K.C College can also be entered as KC college, which would be taken as two different entries!
I have the same problem. I
I have the same problem. I hope someone gives a solution to this one.
Solution found
Ok, I've been looking for an answer to this and found it by trial and error so here goes...
There is no selection for 'select list' for a text field, but if you follow these steps:
1. create a text field anyway and use radio buttons / check boxes instead then add in your allowed values it should show up as expected.
2. Change the widget to a multiline text field and save again. It looke like... a text field, great....
3. Now change the widget again and it will show 'select list' which is FANTASTIC!
I dont know if these are the definitive steps but it worked for me and I came across it by messing around so others may have a more solid answer.
Anyway, I hope it helps!
Chris
It pays to push buttons
Wow. Sometimes you keep doing the same thing and do get a different result. Thanks for posting this work around, I would have figured that out.
All of you missed this
You can definitely create a drop down list which accept text values.
What we all missed (including me when I first used it), as soon as you select 'Text' in 'Select a field type'
list the next box automatically select 'Select List' as the first value.
And when we see this we think oh hang on, we need to click on the list to select a value. Wrong!
The first option in fact is the actual value.
I know how confusing is this but well that's how it's been built.
So, now you know you need to just select that 'Select List' (which is already selected by default) and click save.
You can then configure the field and there you can define the key values in the 'Allowed values list'.
So, if your key is 1 (that is saved in the database) and your value is Undergrade Student
You write it like this
1|Undergrade Student
2|Postgrade Student
and so on and on..
Hope this helps!