Active
Project:
Content Construction Kit (CCK)
Version:
6.x-2.x-dev
Component:
optionwidgets.module
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
26 May 2008 at 06:46 UTC
Updated:
3 Sep 2010 at 21:23 UTC
Jump to comment: Most recent file
Comments
Comment #1
sbsimmons86 commentedI second this (Except on D6). Spent the last two hours trying to find a solution... I dont want to dive into the module code unless I have to.
Comment #2
yched commentedThat's actually a request for optionwidgets.
Moving to D6 branch, this is where development happens.
Comment #3
sbsimmons86 commentedIs there any news on this?
Comment #4
HoKe commentedHi, any news on it?
I do have same problem.
if a field with dropdown list is required only the allowed values are showen and the default value is set to the first in the list. but there should be a value visible but not allowed to used for submitting.
the list of available values should be different (x+1) to allowed values (x)
if i do that by a simple list in allowed values i use "|" which can't be submitted. but if i use PHP code I can't get "|" on the begin of the array.
is there any help?
Thx in advance
HoKe
updated
this was helpful for me. I got it working. I updated the includes/form.inc
http://drupal.org/node/206844#comment-1997930
Comment #5
JStarcher commentedLook at this http://drupal.org/node/206844
There is some code for 5.x there, still working on 6.x
Comment #6
suro.solutions commentedI was getting the same problem. here is the problem that I had
Module - nodereference
when - select list is single select and required the first value in the list was selected by default
Here tweaks I did to solve this issue - see patch file below
Comment #7
smithmilner commentedThank for the link Hoke
I applied the patch and get everything working.
Comment #8
kndrTry this mini module http://drupal.org/node/789116#comment-3365604
Comment #9
cwithout commentedSubscribing.
Installed the mini module and it's working well.
Haven't tested the patch yet since I needed to use it on a live site and don't want to patch it. But I think this is a very important UI improvement.
Admin users will inevitably at some point skip over a field that's already populated, leaving the field with an incorrect selection without the admin even being alerted to their mistake.
I think the ability to make node reference fields (and other types that function the same way) required is currently useless with it automatically populating a value like it does. It's usually preferable to have the field remain empty than for it to have wrong data if the admin user accidentally skips the field.
Use case: The node reference field is for the location of an event. If the field were not required, it would be left blank if the admin skipped it. Users wanting to attend the event don't know where it is. They email the admin and ask where the event is going to be. The admin is then notified of their mistake without users being extremely dissatisfied, because they can still show up to the right place at the right time.
The way things are now, when an admin skips a required field, it still contains some value. If this were the wrong location, customers would have no way of knowing the location is wrong and no reason to contact the admin. They would show up to the wrong location, waste their time, gas money, miss the event, and demand a refund. They would rightfully be very angry and not likely to be repeat customers.
Hence, making the field required is currently worse than leaving as optional even if it is something that ought to be required.