Re: [html-formfu] Having issues with nested repeatable loading from db.

2009-03-06 Thread Ashley Pond V
On Fri, Mar 6, 2009 at 1:14 PM, Moritz Onken wrote: > > Am 06.03.2009 um 13:14 schrieb Carl Franks: > >> 2009/3/5 Moritz Onken : >>> >> >> Other than debugging, would there be a legitimate reason to ever want >> a non-hidden field for the PK? >> > No not really. But I usually start writing form co

Re: [html-formfu] Having issues with nested repeatable loading from db.

2009-03-06 Thread Moritz Onken
Am 06.03.2009 um 13:14 schrieb Carl Franks: 2009/3/5 Moritz Onken : I really really wish that the ID should not be a Hidden field. I ran into this problem several times. Maybe it's time to patch that :) Other than debugging, would there be a legitimate reason to ever want a non-hidden fie

Re: [html-formfu] Having issues with nested repeatable loading from db.

2009-03-06 Thread Carl Franks
2009/3/6 Leanan Sidhe : > I think the point was not to have the PK be non-hidden, but to just not > require it be on the form at all. > > I'm not familiar with the code, but I imagine removing it entirely from the > form would either > a) make things more difficult > b) make things impossible B)

Re: [html-formfu] Having issues with nested repeatable loading from db.

2009-03-06 Thread Leanan Sidhe
I think the point was not to have the PK be non-hidden, but to just not require it be on the form at all. I'm not familiar with the code, but I imagine removing it entirely from the form would either a) make things more difficult b) make things impossible I do recommend though that there be some

Re: [html-formfu] Having issues with nested repeatable loading from db.

2009-03-06 Thread Carl Franks
2009/3/5 Moritz Onken : > I really really wish that the ID should not be a Hidden field. I ran into > this problem several times. > > Maybe it's time to patch that :) Other than debugging, would there be a legitimate reason to ever want a non-hidden field for the PK? Carl ___

Re: [html-formfu] Having issues with nested repeatable loading from db.

2009-03-05 Thread Moritz Onken
Am 05.03.2009 um 20:42 schrieb Leanan Sidhe: Figured out my problem. I didn't have the hidden fields count and id. For me id actually had to be debits_item_id, instead of just id, since that was the primary key for my debititems table. Hi, I really really wish that the ID should not be a

Re: [html-formfu] Having issues with nested repeatable loading from db.

2009-03-05 Thread Moritz Onken
I think we can help ypu best if you provide a test which fails and shows what you are doing. otherwise we cannot help you if cannot provide us with your source code. moritz Am 05.03.2009 um 17:59 schrieb Leanan Sidhe: The only one that seems to be what I want is the many_to_many_repeatabl

Re: [html-formfu] Having issues with nested repeatable loading from db.

2009-03-05 Thread Leanan Sidhe
Figured out my problem. I didn't have the hidden fields count and id. For me id actually had to be debits_item_id, instead of just id, since that was the primary key for my debititems table. For some reason I thought that the count and id hidden fields were just extraneous data, not necessary.

Re: [html-formfu] Having issues with nested repeatable loading from db.

2009-03-05 Thread Leanan Sidhe
The only one that seems to be what I want is the many_to_many_repeatable_nested tests. I notice in there, the call to $form->model->default_values has an extra parameter, a hash ref of { nested_base => 'foo' }. I tried adding {nested_base => 'debits'} to mine, and the end result was that now inst

Re: [html-formfu] Having issues with nested repeatable loading from db.

2009-03-05 Thread Moritz Onken
Am 05.03.2009 um 15:40 schrieb Leanan Sidhe : On Thu, Mar 5, 2009 at 8:46 AM, Ascii King wrote: For starters, I don't think it is supposed to be "schema = DB", just "schema DB" schema DB Also, could you show us the may_have line that sets up the 'debits' relations

Re: [html-formfu] Having issues with nested repeatable loading from db.

2009-03-05 Thread Leanan Sidhe
On Thu, Mar 5, 2009 at 8:46 AM, Ascii King wrote: > For starters, I don't think it is supposed to be "schema = DB", just > "schema DB" > > > > schema DB > > > > Also, could you show us the may_have line that sets up the 'debits' > relationship? I meant might_have, not may_have, an

Re: [html-formfu] Having issues with nested repeatable loading from db.

2009-03-05 Thread Ascii King
For starters, I don't think it is supposed to be "schema = DB", just "schema DB" schema DB Also, could you show us the may_have line that sets up the 'debits' relationship? Leanan Sidhe wrote: I'm attempting to make use of the $form->model->default_values and $form->model->