Dynamic select box

3 views
Skip to first unread message

Rafael

unread,
Jan 20, 2009, 11:48:11 AM1/20/09
to Hobo Users
Hi,

I'm trying to do something just like the "dynamic select box recipe",
but i have a third level there, its "state, city and neighborhood",
state filters the cities just fine, but when i select a city it
doesn't do
anything to the neighborhood select box, it stays disabled. here is
the code in my application.dryml

<extend tag="form" for="Address">
<old-form merge>
<field-list: fields="state, city, neighborhood, address_type,
name, cep">
<city-view:>
<do part="address-city-menu">
<if test="&@address.state">
<select-one options="&@address.state.cities"/>
</if>
<else>
<select disabled><option>First select a state...</option></
select>
</else>
</do>
</city-view:>
<neighborhood-view:>
<do part="address-neighborhood-menu">
<if test="&@address.city">
<select-one options="&@address.city.neighborhoods"/>
</if>
<else>
<select disabled><option>First select a city...</option></
select>
</else>
</do>
</neighborhood-view:>
</field-list:>
</old-form>
</extend>

If i remove the <city-view> block the neighborhood block works when
editing an Address, if
i leave it the way it is just the city block works, any ideas?

Thanks,

Rafael
Reply all
Reply to author
Forward
0 new messages