[html-formfu] Can't fill in values from DB with Repeatable block
kewei xiao
kewei.xiao at nald.ca
Fri Dec 14 12:17:20 GMT 2007
Carl Franks wrote:
> On 13/12/2007, kewei xiao <kewei.xiao at nald.ca> wrote:
>
>> Hi Carl
>>
>> I have a Repeatable Block on my "Update Form" which will display all
>> urls associate with the item I choose, so far it only fills other fields
>> not repeatable part.
>>
>> here is my yml config file:
>>
>> auto_fieldset: 1
>>
>> elements:
>> - type: Hidden
>> name: id
>>
>> - type: Text
>> name: name
>>
>> - type: Repeatable
>> nested_name: urls
>> increment_field_names: 1
>> counter_name: count
>> db:
>> new_empty_row: url
>>
>> elements:
>> - type: Hidden
>> name: id
>>
>> - type: Text
>> name: url
>>
>> - type: Hidden
>> name: count
>>
>> here is the code in my controller part:
>>
>> $form->defaults_from_model( $issue );
>>
>> * urls is the relationship name. *
>>
>> Please advise
>>
>
> hmm, everything looks okay. what type of relationship is urls?
> has_many, many_to_many, ... ?
>
> Carl
>
> _______________________________________________
> HTML-FormFu mailing list
> HTML-FormFu at lists.rawmode.org
> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu
>
>
the relationship is has_many, so issue has many urls associated. After
I sent that email, I tried with Select box, it worked fine, but not
Repeatable.
Ke Wei
More information about the HTML-FormFu
mailing list