Closed (fixed)
Project:
ImageField Extended
Version:
6.x-3.1
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
9 Nov 2009 at 16:33 UTC
Updated:
13 Dec 2009 at 01:53 UTC
Hi!
I'd really need your module to have field text with a drop-down list to select a value from a list. Is this possible?
Thanks in advance
Comments
Comment #1
alan d. commentedThe module is by design a helper tool for developers with a few extra "ease of use" fields. I did not want to go down the Webform path adding 10+ different fields via an interface. The way to add any FAPI field follows the following paradigm.
If you use the Drupal alter hook supplied, you can add any field type. All you need is a custom module and something like this:
The data should be saved and loaded by FileField and your theming functions would present the value to the end user.
For the custom module, all you need is the info file and this function.
Comment #2
kiko commentedThanks a lot!
Comment #3
alan d. commentedI've added this to the documentation page, http://drupal.org/node/628640. Reopen if you have any issues.
;)
Comment #5
bleen commentedAlan D.
I'm having no luck with teh code you supplied. My module (which works for other mini tasks around the site I am working on) is called "strong_helper". The code I am using is here:
Is there anything else I need to do? I've cleared my cache...
I see the line
in the IFE module but it's as though my module is being skipped.
Thoughts? ideas?
(drupal 6.14 | IFE 6.x-3.1)
Comment #6
alan d. commentedYour code looks OK.
Is the function in an include or the module file? It needs to be in the main module file.
The widget is an ImageField Extended widget too? It does not work on the standard imagefield. (Although I think I know a way to eliminate the need for this additional widget now - I just need the time to try this out)
Debugging.
Is the code being executed at the line at "module_invoke_all" is called? In your alter hook? And what is being returned after the invoke all call?
Cheers
Comment #7
bleen commentedAlan D. ... thanks for getting back to me. I'm embarrassed to report that the problem appears to be that the module was disabled by another user. D'oh!!
Comment #8
alan d. commentedThanks for the feedback. Glade it was easily resolved.