Is it possible to implement something equivalent to a drop down menu within
a form wizard?
I want to display a menu which exists on each page of the form, so that the
user can select which step to go to, they can select the step in the menu
and it redirects them to that step.
The problem is that if the user fills out the form in step 1, then they go
to another step and return the that previous step the inputted data is
gone. I can't find a way around this.
I also only want to display this drop down menu only on the form page, not
in the navbar with the other menu items but I can't figure out how to do
it or find anything similar on the web.
Also, the drop-down functionality doesn't seem to work either when I try
implementing it, the submenu just shows up in a horizontal list underneath
"Go to page", rather than a menu that pops up upon clicking.
*menu.py :*
response.menu = [
##Regular menu here
]
DEVELOPMENT_MENU = True
def menu2():
menu2= [
(T('Go to page'), False, '#', [
(T('General Information'), False, URL('default', 'myform/0')),
(T('DAY1'), False, URL('default', 'myform/1')),
(T('DAY2'), False, URL('default', 'myform/2')),
(T('DAY3'), False, URL('default', 'myform/3')),
])
]
*views/layout.html:*
{{if response.menu:}}
{{=MENU(response.menu, _class='nav
navbar-nav',li_class='dropdown',ul_class='dropdown-menu')}}
{{pass}}
*views/default/myform.html:*
<h1>Day: {{=d}}</h1>
{{=form}}
{{=menu2}}
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.