correct
On 20 Apr, 11:40, virhilo <[email protected]> wrote:
> Thanks a lot-it's working:)
> I can have only:
> request.vars and form.accepts(request.vars, formname=None)
> line(without 'if') if i don't want to display any information-yes?:)
>
> On 20 Kwi, 18:29, mdipierro <[email protected]> wrote:
>
> > Then this should do it
>
> > if request.vars and form.accepts(request.vars,formname=None):
> > response.flash="done"
>
> > Massimo
>
> > On 20 Apr, 11:16, virhilo <[email protected]> wrote:
>
> > > No i don't want redirections-i want to stay on the same site:) Only
> > > don't want to have _formname in url.
> > > formname=None cause the INPUT and SELECT '_value' is not parsed
> > > formname='' disable validation :(
> > > or maybe I doing something wrong?
>
> > > On 20 Kwi, 16:16, mdipierro <[email protected]> wrote:
>
> > > > I believe this is working but I think you want something slightly
> > > > different:
>
> > > > def test():
> > > > form=FORM('Package name: ',
> > > > INPUT(_name='name', requires=IS_LENGTH(25), value=''),
> > > > 'Arch: ',
> > > > SELECT(OPTION('Wszystkie', _value='all'),
> > > > OPTION('i686', _value='32'),
> > > > OPTION('x86_64', _value='64'),
> > > > requires=IS_IN_SET(['all', '64', '32']),
> > > > value='all',
> > > > _name='arch'),
> > > > INPUT(_type='submit', _value='Search...'),
> > > > _method='get',
> > > > _action=None)
> > > > if request.vars and form.accepts(request.vars,formname=None):
> > > > session.flash="searching..."
> > > > redirect('somewhere')
> > > > return dict(form=form)
>
> > > > On 12 Apr, 17:03, virhilo <[email protected]> wrote:
>
> > > > > Hello:)
> > > > > I want to send a form using get method, so i make form like this:
>
> > > > > form=FORM('Package name: ',
> > > > > INPUT(_name='name', requires=IS_LENGTH(25), value=''),
> > > > > 'Arch: ',
> > > > > SELECT(OPTION('Wszystkie', _value='all'),
> > > > > OPTION('i686', _value='32'),
> > > > > OPTION('x86_64', _value='64'),
> > > > > requires=IS_IN_SET(['all', '64', '32']),
> > > > > value='all',
> > > > > _name='arch'),
> > > > > INPUT(_type='submit', _value='Search...'),
> > > > > _method='get',
> > > > > _action=None)
> > > > > form.accepts(request.vars)
>
> > > > > Everythink working fine, but web2py adding _formname to
> > > > > request.get_vars, it make urls less reradable.
>
> > > > > Turicas from #web2py irc channel helps me to find solution, when
> > > > > formname='' was added to form.accepts args (so it's now look like
> > > > > that: form.accepts(request.vars, formname='') ) but then the form
> > > > > validation don't working,
>
> > > > > so another solution is setting formname to None ( form.accepts
> > > > > (request.vars, formname=None) ), but then the value fields from SELECT
> > > > > and INPUT are not parsed, form return error 'Value not allowed'
>
> > > > > The web2py default's is to send formname as a hidden field _formname.
> > > > > i think it is unnecessary. The only modification here is that if user
> > > > > submit a form without fill any field, form won't show errors.
>
> > > > > Version 1.60.5 (2009-04-12 11:21:07)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---