Hey guys,
Just wondering where in the CCK module you'd define the number of autocomplete fields to appear when you allow multiple values?
By default, three are always displayed at a time. The problem is, when you use up these three you must 'Submit' and then edit again before you see any more.
I've had a look through the code for the number '3' but can't seem to find where this value is set?
It would be really great if anyone could provide some insight on this.
Cheers,
-Fin
Comments
Comment #1
yched commentedThat behaviour is indeed hardcoded in each field module, in hook_widget. Content.module has no pewer on that.
Well, that's not the case in the forthcoming CCK for D6 : widgets for multiple fields are now handled consistently by content.module, which allows for a nice 'Add more values' JS button :-)
Comment #2
Fintan Darragh commentedHey,
Thanks for the help.
For future reference to those Googling, I've managed to find the integer which controls this behaviour on line 314 of nodereference.module. It's the '2' in this line:
foreach (range($delta, $delta + 2) as $delta) {Thanks!
-Fin
Comment #3
gnosis commentedI've also done this on line 272 of the text.module, in hook_widget, to provide 5 options instead of 3, exact same syntax ($delta + 4). Remember kids: always log if/when you make these kinds of module edits because they will be reverted if you upgrade the module.