new plugin - web2py Form Wizard - PowerFormWizard

753 views
Skip to first unread message

Bruno Rocha

unread,
Jun 29, 2011, 10:33:10 AM6/29/11
to web...@googlegroups.com, web2py-developers, web2py-us...@googlegroups.com
Hi,

I just created a new plugin for stepped form wizards.

I made it last night, so it is not tested very well, I would like your help to test it.

web2py PowerFormWizard Plugin - based on Jquery Stepy

- Steps
- Customizable titles
- Server side validation
- Client side validation (with jquery validate)
- Custom css
- JS Callbaks
- Error images

Take a look: http://labs.blouweb.com/powerformwizard


This plugin is the second plugin of blouweb PowerPlugins, I am now starting the third one which I hope to have the first version soon.

Suggestions, testers, issues, contributions etc on bitbucket: https://bitbucket.org/rochacbruno/powerformwizard 

Hope it helps someone!

Thanks.

--
Bruno Rocha
[ Aprenda Python: http://CursoDePython.com.br ]
[ O seu aliado nos cuidados com os animais: http://AnimalSystem.com.br ]
[ Consultoria em desenvolvimento web: http://www.blouweb.com ]

Tito Garrido

unread,
Jun 29, 2011, 10:55:51 AM6/29/11
to web2py-us...@googlegroups.com, web...@googlegroups.com, web2py-developers
This is awesome! Really cool plugin ;)

Is there a way to change the next step based on choices of a previous step?

Regards,

Tito

--
Você recebeu essa mensagem por estar inscrito no grupo web2py-users-brazil.
Para enviar uma mensagem ao grupo, envie email a: web2py-us...@googlegroups.com
Para se desinscrever, envie email a: web2py-users-br...@googlegroups.com
Para mais opções, visite o site do grupo em: http://groups.google.com/group/web2py-users-brazil?hl=en



--

Linux User #387870
.........____
.... _/_õ|__|
..º[ .-.___.-._| . . . .
.__( o)__( o).:_______

Bruno Rocha

unread,
Jun 29, 2011, 11:00:33 AM6/29/11
to web2py-us...@googlegroups.com, web...@googlegroups.com, web2py-developers
On Wed, Jun 29, 2011 at 11:55 AM, Tito Garrido <titog...@gmail.com> wrote:
This is awesome! Really cool plugin ;)

Thanks, I did for use in one of my systems, and I like to share cool stuff.
That is based on great jquery libs made by @wbotelhos
 

Is there a way to change the next step based on choices of a previous step?

Not yet in plugin, but, That's all Java Script, so you can raise the method by hand.

Is there a public JS method:

$.fn.stepy.step(2, '#powerformwizard');

and you can change the _id on form creation.

I will think about to include it in plugin.

[]' s


--
Bruno Rocha
[ Aprenda Pythonr: http://CursoDePython.com.br ]

Anthony

unread,
Jun 29, 2011, 11:22:31 AM6/29/11
to web...@googlegroups.com
This is great! Thanks for contributing. :-)

GoldenTiger

unread,
Jun 29, 2011, 12:17:00 PM6/29/11
to web...@googlegroups.com, web2py-developers, web2py-us...@googlegroups.com
iujuuuuuu

Bruno, it`s the best web2py plugin for me

congratulations + thanks 

blackthorne

unread,
Jun 29, 2011, 12:50:16 PM6/29/11
to web2py-users
yes! awesome!

just came to my mind having such a system for multiple forms/wizards
managed by the db. So you could easily add forms like that in your app
and manage them. Good for more complex apps like SAP.

niknok

unread,
Jun 29, 2011, 9:01:53 PM6/29/11
to web2py-users
+1

Another golden egg from the proverbial goose ... or gander, in this
case. :P

Thank you Bruno

niknok

unread,
Jun 30, 2011, 2:41:04 AM6/30/11
to web2py-users
In the validation example, I entered a single character in the Bio
and was allowed to proceed to the next field despite the
db.person.bio.requires = IS_LENGTH(minsize=5, maxsize=200). You made
a note about "Client side validation is not supposed to validate
everything!", is this included in that exception?

A few suggestions:
* How about using "description" or "details" instead of the "legend"
keyword at it seems to be more appropriate for said function.

• As default behavior, instead of the default "X" errorImage beside
the step title, how about using an exclamation point icon to indicate
that this step needs attention and then in the specific field with an
error use the "X" icon instead.


The other day you answered my query re modal windows with a reference
to easyframework.com + web2py.

I pray that you have plans of adding that feature to your
PowerFormWizard Plugin (or perhaps turning this into a "PowerForms"
plugin to truly enable feature-full forms in Web2py?

Cheers and many thanks for your many contributions to the web2py
community.


/r
Nik


On Jun 29, 10:33 pm, Bruno Rocha <rochacbr...@gmail.com> wrote:

mart

unread,
Jun 30, 2011, 3:08:11 AM6/30/11
to web2py-users
very cool!!! :)

niknok

unread,
Jun 30, 2011, 3:49:08 AM6/30/11
to web2py-users
Clarification regarding the bio field with requires. It does let me
proceed to the next step, but will not be allowed to submit the data
after validation unless i meet the requires statement.

A bit confusing since some fields will allow me to move to next step.

One more thing, is there going to be an equivalent for
SQLFORM.factory?

Bruno Rocha

unread,
Jun 30, 2011, 8:44:42 AM6/30/11
to web...@googlegroups.com
Even without client side validation, the server side will perform at the end of submission.

The client-side validation, for now, just check if a field is required, i did not implemented yet the other kind of client validation.

I guess you can use factory in the normal way, PowerFormWizard.factory, as PowerFormWizard is a subclass of SQLFORM. - But I did not tested yet.

I just found some issues, I will wait for people to raise more issues and I will update.

Thank you all for testing..
--



--
Bruno Rocha
[ Aprenda a programar: http://CursoDePython.com.br ]

Christian Espinoza

unread,
Jul 13, 2012, 5:05:06 PM7/13/12
to web...@googlegroups.com
Hello Bruno, I did download the example app to test it, but i get this error:

<type 'exceptions.AttributeError'> 'PowerFormWizard' object has no attribute 'readonly'


do you know what can be the problem?

Thanks in advance
Christian.

Akash Kakkar

unread,
Jul 18, 2012, 2:56:10 AM7/18/12
to web...@googlegroups.com, web2py-developers, web2py-us...@googlegroups.com
Hi Bruno,

The links don't work for me (invalid request)


Thanks,
Akash

António Ramos

unread,
Jul 18, 2012, 7:03:12 AM7/18/12
to web...@googlegroups.com
INVALID REQUEST!!!!!!




2012/7/18 Akash Kakkar <akash....@gmail.com>
--
 
 
 

Rahul

unread,
Jul 18, 2012, 8:03:51 AM7/18/12
to web...@googlegroups.com
Well, this works -  you can download the web2py projects from here
   https://bitbucket.org/rochacbruno/powerformwizard

Cheers , Rahul D

António Ramos

unread,
Jul 18, 2012, 9:28:27 AM7/18/12
to web...@googlegroups.com
Can i force the form to show the step that is active?

i want to use this as a workflow between different users.
The first users fills the first step and then submits to the second user.
The second user can edit the second step but can only read the first step and so on....
IS this possible?

Thank you
António


2012/7/18 Rahul <rahul....@gmail.com>
--
 
 
 

António Ramos

unread,
Jul 18, 2012, 11:13:10 AM7/18/12
to web...@googlegroups.com
Also i would be nice in a workflow related document that the tabs that are next in the flow would be highlithed so the user easly sees what is next.



Thank you
António


2012/7/18 António Ramos <ramst...@gmail.com>

Don_X

unread,
Jul 23, 2012, 8:41:45 PM7/23/12
to web...@googlegroups.com
Bruno Rocha,

This is a very nice plugin ! ... very useful, thanks for sharing !

I have to create 2 registrations methods ( one short and one long method to register )

I have one problem, how would you suggest to user the wizard when there are 3 tables involved in the long signup method ??

for example in my db I have many tables ... but the full registration for the app affects 3 tables, while the short one which is already done only affects 1 table ( the auth-user table) !
I need to manipulate the powerformwizard for all 3 tables in the complete registration approach

table1 is the auth-user table with first and lastname, password and email, birthdate and user type.
table2 is the coordinates of the user ( with street adress, city, Zip or postal code, Country of residence, Origin and language spoken )
table3 is the profile informations ( like picture upload, description, story,  bio, ..)

Any suggestions ? ...

thanks

Don


Bruno Rocha

unread,
Jul 23, 2012, 8:43:54 PM7/23/12
to web...@googlegroups.com
Hi,

As I am not having time to keep the plugin updated (and no one wanted toa dopt the plugin)

I recommend the method using steps and session, I use this sometimes and works well, take a look: http://www.web2pyslices.com/slice/show/1452/form-wizard



Don


--
 
 
 

Bruno Rocha

unread,
Jul 23, 2012, 8:45:59 PM7/23/12
to web...@googlegroups.com

Bruno Rocha

unread,
Jul 23, 2012, 8:46:36 PM7/23/12
to web...@googlegroups.com

Don_X

unread,
Jul 24, 2012, 12:06:56 AM7/24/12
to web...@googlegroups.com
Bruno,

I did follow these examples already ... I tried different things ... different approaches ... but for 3 tables it seems not do-able !
I am still searching for ways for it to be done ! .. so far .. no luck ! ...
I tried using the method with 3 tables like this ( by combining the method described in ch: 4  page 153 of the same book you refereed to )
 form = SQLFORM.factory(db.auth_user,db.coord_user,db.user_profile)
....
but ..no luck ! ...

I wander is the form wizard ... or the powerformwizard can work with more than 2 tables ?????
if yes ... I have not figure out how to do it .... not yet ! .. meanwhile if anyone have any suggestion .... please enlighten me !!

thx

Don

juaneduardo

unread,
Dec 26, 2012, 3:55:22 PM12/26/12
to web...@googlegroups.com
Bruno to solve 

'PowerFormWizard' object has no attribute 'readonly'


 I added 2 lines to powerForm plugin

In modules/plugin_PowerFormWizard.py
def __init__(self, 
                 table, 
                 steps, 
                 formstyle = 'divs',
                 options={},
                 _id = 'powerformwizard',
                 record = None,
                 fields = None,
                 ignore_rw = False, 
                 record_id=None,
                 readonly=None, #maybe another value for default
                 **attributes
                 ):

        if formstyle not in ['divs','ul']:
            raise AttributeError("SQLFORM formstyle not accepted")
        
        from gluon import current
        response = current.response
        self.T = current.T
        self.table = table
        self.formstyle = formstyle
        self.attributes = attributes
        self.ignore_rw = ignore_rw
        self.record_id = record_id
        self.options = options
        self._id = _id
        self.readonly=readonly

and the problem is gone....

Happy New Year... to all from Chile

Massimo Di Pierro

unread,
Jan 9, 2013, 12:09:55 PM1/9/13
to web...@googlegroups.com, web2py-developers, web2py-us...@googlegroups.com

juaneduardo

unread,
Jan 9, 2013, 4:13:08 PM1/9/13
to web...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages