[html-formfu] Asking for example again

Carl Franks fireartist at gmail.com
Wed Mar 10 12:26:56 GMT 2010


2010/3/10 Alex Povolotsky <tarkhil at over.ru>:
> Hello!
>
> I recall I've done it with HTML::FormFu::Model::DBIC once, but I could not
> find code...
>
> Having two simple tables
>
> create table country (id serial primary key, name varchar(128) not null);
> create table city (id serial primary key, name varchar(128) not null,
> country int not null references country(id));
>
> how do I create a form to add/edit city allowing to add country on the fly?
>
> Just a selection of existing ones is trivial. I understand I must group
> Select and Text, but how exactly?

Use a ComboBox element.

There's lots of examples in the HTML-FormFu-Model-DBIC test suite:
http://search.cpan.org/grep?cpanid=CFRANKS&release=HTML-FormFu-Model-DBIC-0.06000&string=combobox&i=1&n=1&C=0

Cheers,
Carl



More information about the HTML-FormFu mailing list