(maybe) you could build the form skeleton in the code.py: def form_frame(name, method(default POST), [something else?], the_form): form_tmp = """ <form name = i%(name)s method = %(method)s action = %(... ... %(form)s </form> return form
""" On Thu, Jan 6, 2011 at 2:01 PM, Dexter <[email protected]> wrote: > Consider the foll code scenario ... a simple form is being created and > rendered without using templates > > #################################################### > formProject = form.Form( > form.Textbox('ProjectName', description="Project Name"), > form.Textbox('Version') > form.Password('password'), > form.Dropdown('Type',['A','B'], description="Type of project"), > form.Button('Create',type ="submit") > ) > > > class project: > def GET(self): > ProjectInput = formProject() > return ProjectInput.render() > #################################################### > > Here a button will be displayed at the bottom of the form ... the > problem is ... clicking it does not do anything .... > I can always use the form in a template and use a <form method="post" > action="/foo"> clause but isnt there anyway we can get the work done > in the .py file itself > > I m making a threadbare application with just a few inputs for the > form... not interested in making a template .html for it ... > > -- > You received this message because you are subscribed to the Google Groups > "web.py" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected] <webpy%[email protected]>. > For more options, visit this group at > http://groups.google.com/group/webpy?hl=en. > > -- You received this message because you are subscribed to the Google Groups "web.py" 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/webpy?hl=en.
