Massimo,
where do I change the INPUT size (length, width)?
links = [lambda row: INPUT(_name='quantity', _class='integer', _value=1)]
On Wednesday, 11 April 2012 18:34:16 UTC-7, Massimo Di Pierro wrote:
>
> yes and not and what I said needs clarification.
>
> grid = SQLFORM.grid(create=False,update=False) is not a form. If
> create=True or update=True then it contains a form when you are creating or
> updating a record. you must avoind a form within a form and you can do so
> in the view:
>
> {{if grid.create_form or grid.update_form:}}
> {{=grid}} it is a form
> {{else:}}
> <form>{{=grid}} it is not a form but you can embed it in one <input
> type='submit'/></form>
> {{pass}}
>
>
> On Wednesday, 11 April 2012 20:23:08 UTC-5, greenpoise wrote:
>>
>> A bit confused..I thought SQLFORM.grid was itself a form? Also, can I add
>> more than one link per grid? Reading from the book, it creates a column so
>> technically sounds as if I could???
>>
>> On Wednesday, 11 April 2012 16:27:17 UTC-7, Massimo Di Pierro wrote:
>>>
>>> You can put the grid in a form and you add
>>>
>>> SQLFORM.grid(..., link=[lambda row: INTPUT(...)])
>>>
>>> On Wednesday, 11 April 2012 17:07:58 UTC-5, greenpoise wrote:
>>>>
>>>> Is this possible?? I have a products table that shows all the products.
>>>> I also created an add to cart button in it problem is if I want to add 100
>>>> items I would have to press the button 100 times. Is there a way to add a
>>>> quantity text field???
>>>>
>>>>
>>>> Thanks
>>>>
>>>> Dan
>>>>
>>>
>> On Wednesday, 11 April 2012 16:27:17 UTC-7, Massimo Di Pierro wrote:
>>>
>>> You can put the grid in a form and you add
>>>
>>> SQLFORM.grid(..., link=[lambda row: INTPUT(...)])
>>>
>>> On Wednesday, 11 April 2012 17:07:58 UTC-5, greenpoise wrote:
>>>>
>>>> Is this possible?? I have a products table that shows all the products.
>>>> I also created an add to cart button in it problem is if I want to add 100
>>>> items I would have to press the button 100 times. Is there a way to add a
>>>> quantity text field???
>>>>
>>>>
>>>> Thanks
>>>>
>>>> Dan
>>>>
>>>