This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

Multipage Forms (Wizards)

Requests for new symfony features.

Multipage Forms (Wizards)

by pipp » Thu Jan 04, 2007 8:18 pm

It would be nice to have a smart -- symfony-style :)~ :-)~ :smile: -- way of handling multi page forms (like a wizard or an assistant). Currently my actions file becomes quite messy and redundant in order to achieve this. Should this be a plugin? :?~ :-?~ :???:
pipp
Member
 
Posts: 33
Joined: Sun Dec 10, 2006 12:53 am

Re: Multipage Forms (Wizards)

by pezetgee » Mon Jan 08, 2007 4:54 pm

I'm looking for a solution for that as well, manage multiple forms within one module using one set of actions.

I got to the point of displaying correct content of the forms, but validation doesn't work. It would be good if there was a way to specify validation file to load.
pezetgee
Faithful Member
 
Posts: 734
Joined: Fri Mar 31, 2006 11:55 am

Re: Multipage Forms (Wizards)

by z01d » Thu Apr 19, 2007 12:35 pm

Don't know guys, what is the problem with current symfony setup?
One action/template per form/step? Works for me.
z01d
Senior Member
 
Posts: 160
Joined: Sat Dec 10, 2005 11:47 pm

Re: Multipage Forms (Wizards)

by pezetgee » Fri Apr 20, 2007 9:55 am

One action/template per form/step?

Yes, that's easy if you hard code your templates.

I needed solution for forms with fields 'generated' by user in runtime.
Since then I've coded a module for that.
As the module was coded for specific requirements of my app I'm not going to release as plugin or snippet - the module ties too much with the app core code.

I'm thinking, however, how to make it more generic and then do a plugin.
pezetgee
Faithful Member
 
Posts: 734
Joined: Fri Mar 31, 2006 11:55 am

Re: Multipage Forms (Wizards)

by Notorious » Tue Apr 24, 2007 10:31 am

pezetgee, I have created a topic where I need what you've created. Could you give me a hint on how to approach this, or maybe release a bit more info? My topic can be found at http://www.symfony-project.com/forum/index.php/t/6154/. Any help is highly appreciated!
Notorious
Senior Member
 
Posts: 147
Joined: Mon Mar 05, 2007 10:17 pm

Re: Multipage Forms (Wizards)

by Kodie » Tue Apr 24, 2007 3:10 pm

Hello,

I have just coded class that handles some stuff while creating multi-page forms. It is very alpha version so not everything is completed. It is also my first pluginlike thing so not everything is how it should be. Code need a bit of refactoring as well.

I haven't written any tutorial considering it, but I have attached sample config files (forms.yml should be in config dir and test.second.yml should be in validate.yml).

Class support symfony-like validation. You can use your own template for each form or page.

What isn't still done:
- clean up after finishing form (there are data in session variables)
- support some fields ( like options for select from model )
- default template ( it is only very simple )

It is still very early version and should not be used for real projects. I hope you can give me some advices about it. I'm looking forward for any comments.

Oh, can some one tell me how to easily create package.xml file for plugin?

Thanks in advance,
Kodie
Attachments
sfMultiPageForm.tar.gz
(5.29 KiB) Downloaded 587 times
Kodie
Junior Member
 
Posts: 3
Joined: Tue Apr 24, 2007 2:51 pm
Location: Katowice, Poland

Re: Multipage Forms (Wizards)

by cblin » Tue Apr 24, 2007 4:03 pm

before I look at it, could you please tell if you use the session or hidden vars to store the vars between the pages ?
cblin
Faithful Member
 
Posts: 264
Joined: Mon Jul 17, 2006 5:58 pm

Re: Multipage Forms (Wizards)

by Kodie » Tue Apr 24, 2007 4:05 pm

I use session vars. Could anyone test it and tell me what should I add or change?

Thank you in advance,
Kodie
Kodie
Junior Member
 
Posts: 3
Joined: Tue Apr 24, 2007 2:51 pm
Location: Katowice, Poland

Re: Multipage Forms (Wizards)

by Kaore » Thu Apr 29, 2010 9:02 am

Hi, I just made a post describing a way to do multiple page forms here: http://tech.cibul.org/a-way-to-make-multipage-forms-with-sym fony/
Kaore
Junior Member
 
Posts: 6
Joined: Sat Apr 11, 2009 2:51 pm
Location: Dubai