Thanks, I fixed it with the next code:
redirect(URL('modificar_obra',vars=dict(a=form.vars.nombre)))

On 19 ene, 11:19, Kenneth Lundström <[email protected]>
wrote:
> If you look at form.vars.name1 before passing them via redirect you ll
> see that no replacing has been done, try with
>
> if form.accepts (request.vars, session):
>      session.flash = "Form sent"
>      return form.vars.name1
>
> the replacing happens in the redirect because you can t have an URL with 
> spaces in it. If you pass name1='test ing' and test2='huu huu' you would get 
> an URL like
>
> /eliminar_prevencion_riesgos/test ing/huu huu/ and thats not allowed in 
> web2py.
>
> Kenneth
>
>
>
>
>
>
>
> > When I extract the value of a form field, if I've written  for example
> > "take helmet", I get the value of field `take_helmet, why?
> > The code is as follows:
>
> >       form = FORM ('name risk',
> >                   INPUT (_name = 'name1', required = [IS_NOT_EMPTY (),
> > IS_UPPER ()]),
> >                   'preventive action Name:',
> >                   INPUT (_name = 'name2', required = [IS_NOT_EMPTY (),
> > IS_UPPER ()]),
> >                   INPUT (_type = 'submit'))
> >       form.accepts if (request.vars, session):
> >           session.flash = "Form sent"
> >           redirect (URL ('eliminar_prevencion_riesgos', args =
> > (form.vars.nombre1, form.vars.nombre2)))
>
> > When I look at the value of variables, form.vars.name1,
> > form.vars.name2, spaces between words are filled with the symbol '_'.
> > How I can fix this?

Reply via email to