A client requires the filefield description field to be a select box, with a fixed set of file descriptions.

Any pointers on the best approach to theming / form_altering the textfield type to select?

I can take care of the options population myself.

thanks in advance.

DT

Comments

quicksketch’s picture

I'd suggest looking at FileField Sources or ImageField Extended to see how they alter FileFields through hook_elements().

quicksketch’s picture

Category: feature » support
Status: Active » Fixed

Marking fixed since this was open for so long. It will close automatically in 2 weeks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

davidwhthomas’s picture

Thanks quicksketch!

After trying various approaches with PHP, I ended up implementing this using client side javascript / ajax to replace the textfield with a select box as I know the clients all have js enabled.

Next time round, I'll have a peek into hook_elements.

DT