Thanks Anthony, its now working.
On Tuesday, September 9, 2014 4:20:48 PM UTC+5:30, T.R.Rajkumar wrote:
>
>
> I have a hidden input in form. I set the hidden value in client by java
> script. But I am not able to get the value in request.vars or
> request.post_vars in controller. It returns None
Note, you need to give your input a "name" attribute:
INPUT(_name='txtNoOfRows', _id='txtNoOfRows', _class='hidden', _value=len(l
))
Anthony
On Wednesday, September 10, 2014 10:17:31 AM UTC-4, Anthony wrote:
>
> On Wednesday, September 10, 2014 7:26:12 AM UTC-4, trr wrote:
>>
>> Thanks Niphlod.
On Wednesday, September 10, 2014 8:45:36 AM UTC-4, Mirek Zvolský wrote:
>
> Maybe(?) he creates hidden field in the html, instead to define it in the
> SQLFORM():
> form = SQLFORM.factory(
> Field('customer', label="Select customer"),
> hidden=dict(customer_id='')
> )
>
D
On Wednesday, September 10, 2014 7:26:12 AM UTC-4, trr wrote:
>
> Thanks Niphlod. I changed from _type='hidden' to _class='hidden. But still
> it is not in request.vars. In controller I do
> INPUT(_id='txtNoOfRows',_class='hidden',_value=len(l)),
>
No need for that -- _type='hidden' should work
Thanks Niphlod. I changed from _type='hidden' to _class='hidden. But still
it is not in request.vars. In controller I do
INPUT(_id='txtNoOfRows',_class='hidden',_value=len(l)),
On Tuesday, September 9, 2014 4:20:48 PM UTC+5:30, trr wrote:
>
>
> I have a hidden input in form. I set the hidden val
Maybe(?) he creates hidden field in the html, instead to define it in the
SQLFORM():
form = SQLFORM.factory(
Field('customer', label="Select customer"),
hidden=dict(customer_id='')
)
Dne středa, 10. září 2014 14:34:44 UTC+2 Anthony napsal(a):
>
> trr said the value is *no
maybe it works without this line too:
Field('customer_id', readable=False, writable=False),
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received t
trr said the value is *not* in request.vars.
On Wednesday, September 10, 2014 8:32:51 AM UTC-4, Mirek Zvolský wrote:
>
> You need to rewrite request.vars into form.vars in form validation.
> I use following (based on maybe web2py doc or maybe some article in this
> conference).
> I have javascrip
Can you show your code? What does the DOM look like right before
submitting? Using the browser tools, what data get sent with the post
request?
On Tuesday, September 9, 2014 6:50:48 AM UTC-4, trr wrote:
>
>
> I have a hidden input in form. I set the hidden value in client by java
> script. But
You need to rewrite request.vars into form.vars in form validation.
I use following (based on maybe web2py doc or maybe some article in this
conference).
I have javascript YUI2 autocomplete in client (on customer field), which
will set hidden customer_id field.
In JavaScript I use jQuery selector
by default in form submission any input with the attribute hidden is not
sent. That's HTML 101. If you need something that is not visible to the
user but the browser still needs to submit, use css, not the attribute
hidden.
On Tuesday, September 9, 2014 12:50:48 PM UTC+2, trr wrote:
>
>
> I hav
11 matches
Mail list logo