[html-formfu] Can't fill in values from DB with Repeatable block

Carl Franks fireartist at gmail.com
Thu Dec 13 23:32:26 GMT 2007


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



More information about the HTML-FormFu mailing list