Adding pulldown to form

Hi all, wonder if anyone has the what 4 lines of code to get a pulldown into a form. Going crazy from trying.

I have my views/default/myplugin/input/pulldown.php etc.

I just can't work out how to get the pulldown into the actual form.

Any ideas?

  • I'm puzzled. There is already a standard pulldown view.

    Why are you creating your own?

  • @Kevin - this is not in your forms plugin. ;-)

    Should have been more specific. Adding pulldown to form read as Adding a pulldown field to a form

    This is plugin development group right?

  • I wasn't referring to my plugin.

    I was referring to the standard input/pulldown view.

    Take a look at the code in views/default/input/pulldown.php

    (Although it is slightly broken - the fix is in SVN).

    If you grep for "input/pulldown" in the source tree you will find several examples of how to use it.

    Basically you pass an internalname, a value and a list of options. There are two formats for options depending upon whether you want to distinguish between option labels and values.

  • @Kev - thanks buddy. I've found the answer, just testing it now.