[html-formfu] nested_name and order_by
Benjamin Martin
benjamin at opusvl.com
Wed Jun 23 13:27:45 GMT 2010
Hi Carl,
Thanks for the reply... I really could do with the feature so I will
certainly have a look at getting a patch ready, not sure how I will get
on, but I will give it a bash ;)
cheers :)
On 23/06/10 13:54, Carl Franks wrote:
> On 23 June 2010 12:11, Benjamin Martin<benjamin at opusvl.com> wrote:
>
>> 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?
>>
> This isn't implemented at the moment.
> However, the options_from_model() method already supports
> {model_config}{attributes}, so I'd certainly accept a patch that adds
> it for default_values().
>
> Carl
>
> _______________________________________________
> HTML-FormFu mailing list
> HTML-FormFu at lists.scsys.co.uk
> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu
>
>
More information about the HTML-FormFu
mailing list