In short, the INPUT(...) is, with no doubt, rendered as a text input
field. You need a SELECT(...) to show up as a drop-down list. That is
how HTML works, isn't it?

Generally speaking, it is not recommended to build forms manually.
Define your db table and use SQLFORM instead. PS: Once upon a time, I
did not know how to customize forms so I build my own forms manually.
Before long I realized the code becomes unmaintainable quickly. So,
come back before it is too late, let's do things in a web2pythonic
way, pal.

Regards,
Iceberg

On Sep17, 6:00pm, encompass <[email protected]> wrote:
> I am trying to make a form...
> ---
> def solution_manager():
>     form = FORM('Solution Name:',
>                 INPUT(_solution_name='solution', requires=IS_IN_DB
> (db,'solution.id')), # IS_IN_DB(db,'solution.id'),
>                 'Issue Name:',
>                 INPUT(_issue_name='issue', requires=IS_IN_DB
> (db,'solution.id')),
>                 INPUT(_type="submit"))
>     if form.accepts(request.vars, session):
>         response.flash = "Form Accepted"
>     elif form.errors:
>         responce.flash = "Form has an error."
>     else:
>         response.flash = "Please fill in the form."
>     issues = db().select(db.issue.ALL)
>     return dict(form=form, issues = issues)
> ---
>
> But it doesn't show a drop down list of the solution id's (Or better
> the names).
> Also, the book gives similar code, but I don't get a <br/> between the
> form entries.  They come out on a single line.
> Any ideas?
> Regards,
> Jason Brower
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to