FWIW - My concern for this is primarily that as I add fields to tables
months/years from now I may forget to set writable to False for them and
therefore they would be set to NULL without my being aware. To get around
this, I've added the following to my controllers that use SQLFORM.grid and
c
Not what I wanted to hear, but that is what I figured was the issue.
However, I think it should be noted in the book that when using
SQLFORM.grid and custom forms that any field not included in the custom
form will be set to NULL on every update of the form.
On Mon, Jun 17, 2013 at 12:53 AM, Ma
I am afraid this is not possible because HTML cannot distinguish an empty
submission from no submission. Somehow we have to tell that explicitly to
web2py. Perhaps there is a better way to do it but I do not see on. :-(
On Sunday, 16 June 2013 15:35:27 UTC-5, Jim S wrote:
>
> I thought I could
I thought I could just use whatever fields I wanted and it would figure out
which ones to update. The way it is now, if I add a field to a table and
it isn't included in the writable = False statements the It is going to be
set to null on any future updates. I would prefer to not have to worry
ab
How do you think it should work? If we can make it better we will.
On Sunday, 16 June 2013 15:02:28 UTC-5, Jim S wrote:
>
> I was hoping I wouldn't have to do that but I understand. I think it
> should be pointed out in the manual that this needs to be done so others
> don't make the same mista
I was hoping I wouldn't have to do that but I understand. I think it
should be pointed out in the manual that this needs to be done so others
don't make the same mistake I did.
Thanks Massimo, I really appreciate the reply.
Jim
On Jun 16, 2013 3:41 AM, "Massimo Di Pierro"
wrote:
> The problem
The problem is that the grid expects the field to be writable in the form.
You do not include them therefore it thinks they are empty (html
convention, not web2py's).
Assuming you want the fields in the "create" form but not in the edit form
you can replace:
grid = SQLFORM.grid(db.person.i
I just reverted back to 2.4.6-stable+timestamp.2013.05.10.08.32.00 and the
problem exists there as well.
-Jim
On Friday, June 14, 2013 8:54:59 AM UTC-5, Jim S wrote:
>
> Here you go. Attached.
>
> -Jim
>
>
> On Thursday, June 13, 2013 10:46:58 PM UTC-5, Massimo Di Pierro wrote:
>>
>> Can we see
Can we see an example?
On Thursday, 13 June 2013 16:32:34 UTC-5, Jim S wrote:
>
> It is possible that I'm losing my mind, but it appears to me that when I
> submit a SQLFORM.grid update with a custom form that fields not included in
> the custom form are being set to NULL even if they had a valu
9 matches
Mail list logo