I want to break up the form into large chunks to make it easier for the
user, yes.
I have 5 steps defined containing the fields, and then changed the code to
the following so that the entire form is displayed on the page with the
following:
STEPS = {0: ('fields1', 'fields2', 'fields3'),
1: ('fields3', 'fields5', 'fields6'),
....#and so on
record = db.myform(request.args(0))
form =SQLFORM(db.myform, record)
if form.accepts(request,session):
response.flash='Thanks,form submitted'
redirect(URL'(myformlist'))
else:
# db.myform.insert(**session.myform)
session.flash = T('form completed')
#redirect(fields)
return dict(form=form)
Now the jquery works again, but I just want to make sure I am understanding
you and going about it the right way.
Can I use the steps I have defined with the form wizard, instead of having
to do hundreds of jquery commands with individual fields, using the jQuery
steps implementation?
Or do I use only the jQuery steps documentation without the web2py form
wizard steps, and make steps only using that documentation.
I hope the way I am wording this makes sense, it sounds kind of confusing.
I think I'm making this more confusing than it needs to be, sorry but I
have been stuck on this for a while.
On Monday, December 28, 2015 at 10:06:58 AM UTC-8, Anthony wrote:
>
> On Monday, December 28, 2015 at 12:56:04 PM UTC-5, [email protected]
> <javascript:> wrote:
>>
>> Doesn't that defeat the purpose of using a form wizard, since I can use
>> jquery effectively without it all on the same page?
>>
>
> I suppose it depends on why you are using a form wizard. Is the purpose of
> the wizard to break up a larger form into chunks to make the user
> experience better? If so, I see no reason not to keep it all on one page.
> The only reason to break it up into multiple pages is if you need to submit
> each page for server-side validation -- but even then, you could make the
> interim submissions via Ajax and still keep all the form code on a single
> page.
>
>
>> I have looked into jquery and did some excercises on codecadamy, and I
>> think I understand it alright..I just don't know how to incorporate it with
>> web2py code.
>>
>
> My previous suggestion was to use something like
> http://www.jquery-steps.com/Examples#advanced-form. Nothing changes from
> the web2py perspective -- it's just a single form on a single page that
> gets submitted once when everything is complete. Regarding handling the
> "wizard" aspects of the form, you would have to follow the jQuery Steps
> documentation, as that is not web2py specific.
>
> Anthony
>
--
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.