[html-formfu] model_stash + model_config with ComboBox element

Ascii King tech at swattermatter.com
Mon Mar 9 14:05:14 GMT 2009


Carl Franks wrote:
> 2009/3/5 Ascii King <tech at swattermatter.com>:
>   
>> Is there some reason this will not work within a repeatable group? I have
>> this set up and it runs fine unless I move it inside a repeatable block and
>> then it will not populate.
>>     
>
> I don't know, I don't think I've tried it.
> Can you take one of the Repeatable tests in
> HTML-FormFu-Model-DBIC/t/default_values/
> and expand it to test for this?
>
> Carl
>
> _______________________________________________
> HTML-FormFu mailing list
> HTML-FormFu at lists.scsys.co.uk
> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu
>
>   
I wasn't able to figure out how to use the tests. I was getting some 
error about "DBICTestLib".  I'm afraid that I simply don't understand 
the testing process. I need to read WWW::Mechanize to learn about testing?

I manually tested it though and I found that trying to load a select 
statement from within a repeatable block fails. The following code is 
what I used. I tried it with different relationships (nested_name) and 
different lookup tables (resultset) and none worked. However, if I 
remove the hidden id field, causing the repeatable block to fail, then 
the select statement populates properly.


    - type: Hidden
      name: appointment_count

    - type: Repeatable
      nested_name: appointments
      counter_name: appointment_count
      elements:

        - type: Hidden
          name: appointment_id

        - type: Select
          name: account_listing
          label: Account Listing
          model_config:
            resultset: Account
            id_column: account_id
            label_column: username




More information about the HTML-FormFu mailing list