[html-formfu] nested_name and order_by

Benjamin Martin benjamin at opusvl.com
Wed Jun 23 11:11:50 GMT 2010


Hello,

I am using a Repeatable element to build a form based on a DBIx::Class 
object and its has_many relationship. (using 'nested_name')

My config looks something like this:

       - type: Text
         name: persons_name

       - type: Hidden
         name: requests_counter

       - type: Repeatable
         nested_name: requests
         counter_name: requests_counter
         elements:
           - type: Hidden
             name: id

           - type: Text
             name: request_date

It works real well but I can't seem to get the form to list the related 
items in a defined order?

I guess i need something like:

       - type: Text
         name: persons_name

       - type: Hidden
         name: requests_counter

       - type: Repeatable
         nested_name: requests
         counter_name: requests_counter
         model_config:
           attributes:
             order_by: request_date
         elements:
           - type: Hidden
             name: id

           - type: Text
             name: request_date

Could anyone please tell me if this is possible and if so what am I 
doing wrong?

Many thanks,
-Ben








More information about the HTML-FormFu mailing list