Closed (fixed)
Project:
CCK Select Other
Version:
7.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
31 Aug 2010 at 02:49 UTC
Updated:
23 Mar 2011 at 17:51 UTC
Jump to comment: Most recent file
Comments
Comment #1
mradcliffeI'll take a look into this as soon as I can.
Comment #2
benone commentedWow :) if you take a look as fast as you answered it will be a drupal issue record in patching time ;)
Comment #3
benone commentedI tested again when I do not type anything it just fill this field with word 'other'. I can see that when I go to edit.
Comment #4
mradcliffeThis patch passes all tests currently. I may write a test specifically for this case.
Comment #5
mradcliffeOkay, here's a patch with an added test to test default values. Passes.
I ran the test with the .module file unpatched, and it failed. So that's good too.
Comment #6
benone commentedThats great.
In meanwhile I found also this module and gave it a try - http://drupal.org/project/select_or_other .
It works in exactly the same way. Can you explain me the difference between them ?
I checked using devel if the other field value is stored in the same field and it is.
So I actually dont see any difference. Is there any ?
Comment #7
mradcliffeThere really isn't much difference. I didn't find the module until after I had developed this one and posted it, but need to keep this one updated.
Comment #8
benone commentedorayt, understand.
Comment #9
mradcliffeComment #10
mradcliffeoops
Comment #11
mradcliffeThe patch is working in Drupal 6. There is the same problem in Drupal 7, but it needs additional finagling to get it to work. It seems that default values are not same the same way as they are in CCK in Drupal 6 (ugh, D7 field api).
Comment #12
mradcliffesetting status.
Comment #13
mradcliffeFor D7 (and maybe changing for D6): A better way to do this is with required option on fields and do an option element_validate callback if required is set.
Hindsight is 20/20
Comment #14
mradcliffeCommitted.