Re: [web2py] Help : SQLFORM.factory with multiple submit button ?

2011-07-15 Thread Patrick Installe
Solved :-)

I respond to myself :-) I was looking in the wrong direction :-(

Thank for the previous reponses, but in my case they doesn't fit since I
construct a graph instead of a list.

The solution template that works for me  :

In the controler :

def widget_submit_button(field,value):
# widget for additional form button
item = INPUT(_type='submit', _name=field, _value=value, value=value)
return (SPAN(item))

...

def form_1():
  #
  form = SQLFORM.factory(Field('btn_back', 'string', default=T(' Back'),
widget=widget_submit_button), submit_button=T('Next '))

  if form.accepts(request.vars, session):
if request.vars.has_key('no_table.'+'btn_back'):
redirect(URL('form_0'))
   redirect(URL('form_2'))

return dict(form=form)

...


in the view I use :
...
{{=form.custom.begin}}
..
{{=form.custom.widget['all_back']}}
{{=form.custom.submit}}
{{=form.custom.end}}
...

--
Patrick Installé (pinsta...@gmal.com)


[web2py] Help : SQLFORM.factory with multiple submit button ?

2011-07-13 Thread Patrick Installe
Hello,

I have series of forms with in final validation. I would like that the
user could go forward and backward between forms. Quite classical.

I use SQLFORM.factory which I think is right equilibrium for the application.

I would like to have in the forms one button forward and one button
backward.  The user could have made some modification in the displayed
form, he would not understand why his modifications are lost.

In SQLFORM.factory there is only one submit_button. I have try to
change the string to a list or better a dictionnary but the result is
not what I expected :-(

I am suprised that I did not found any topic about this in web2py
discussion. Perhaps I miss something.

Is there a way to implement multiple submit button in SQLFORM in web2py ?

I know a workarround is to add radio-buttons or check boxes , but I
admit it is not smart for the final user.

Thank in advance for your response.


-- 
Patrick Installé (pinsta...@gmal.com)


Re: [web2py] Help : SQLFORM.factory with multiple submit button ?

2011-07-13 Thread Kenneth Lundström

I think this is what you are looking for:

http://labs.blouweb.com/powerformwizard 
http://www.google.com/url?sa=Dq=http://labs.blouweb.com/powerformwizard



Kenneth


Hello,

I have series of forms with in final validation. I would like that the
user could go forward and backward between forms. Quite classical.

I use SQLFORM.factory which I think is right equilibrium for the application.

I would like to have in the forms one button forward and one button
backward.  The user could have made some modification in the displayed
form, he would not understand why his modifications are lost.

In SQLFORM.factory there is only one submit_button. I have try to
change the string to a list or better a dictionnary but the result is
not what I expected :-(

I am suprised that I did not found any topic about this in web2py
discussion. Perhaps I miss something.

Is there a way to implement multiple submit button in SQLFORM in web2py ?

I know a workarround is to add radio-buttons or check boxes , but I
admit it is not smart for the final user.

Thank in advance for your response.






Re: [web2py] Help : SQLFORM.factory with multiple submit button ?

2011-07-13 Thread Bruno Rocha
I have used two approaches, the old one that you can find here:
http://www.web2pyslices.com/slices/take_slice/127

and the new way using a plugin: http://labs.blouweb.com/powerformwizard

With the first you can have more custom options and can use forms for
different tables, with the former you can have client side validation.

2011/7/13 Kenneth Lundström kenneth.t.lundst...@gmail.com

  I think this is what you are looking for:

 http://labs.blouweb.com/powerformwizardhttp://www.google.com/url?sa=Dq=http://labs.blouweb.com/powerformwizard


 Kenneth

  Hello,

 I have series of forms with in final validation. I would like that the
 user could go forward and backward between forms. Quite classical.

 I use SQLFORM.factory which I think is right equilibrium for the application.

 I would like to have in the forms one button forward and one button
 backward.  The user could have made some modification in the displayed
 form, he would not understand why his modifications are lost.

 In SQLFORM.factory there is only one submit_button. I have try to
 change the string to a list or better a dictionnary but the result is
 not what I expected :-(

 I am suprised that I did not found any topic about this in web2py
 discussion. Perhaps I miss something.

 Is there a way to implement multiple submit button in SQLFORM in web2py ?

 I know a workarround is to add radio-buttons or check boxes , but I
 admit it is not smart for the final user.

 Thank in advance for your response.







-- 



--
Bruno Rocha
[ About me: http://zerp.ly/rochacbruno ]
[ Aprenda a programar: http://CursoDePython.com.br ]
[ O seu aliado nos cuidados com os animais: http://AnimalSystem.com.br ]
[ Consultoria em desenvolvimento web: http://www.blouweb.com ]


Re: [web2py] Help : SQLFORM.factory with multiple submit button ?

2011-07-13 Thread Jim Steil

PowerFormWizard?

http://labs.blouweb.com/powerformwizard

-Jim

On 7/13/2011 9:27 AM, Patrick Installe wrote:

Hello,

I have series of forms with in final validation. I would like that the
user could go forward and backward between forms. Quite classical.

I use SQLFORM.factory which I think is right equilibrium for the application.

I would like to have in the forms one button forward and one button
backward.  The user could have made some modification in the displayed
form, he would not understand why his modifications are lost.

In SQLFORM.factory there is only one submit_button. I have try to
change the string to a list or better a dictionnary but the result is
not what I expected :-(

I am suprised that I did not found any topic about this in web2py
discussion. Perhaps I miss something.

Is there a way to implement multiple submit button in SQLFORM in web2py ?

I know a workarround is to add radio-buttons or check boxes , but I
admit it is not smart for the final user.

Thank in advance for your response.