I´m moving this thread to the Dreamweaver Developer Toolbox (ADDT) PHP Application Development forum
Is there a way for me to add to fileds to the dependent dropdown?
check bold part, i want to display both the name and the count.
<select name="city" id="city" wdg:subtype="DependentDropdown" wdg:type="widget" wdg:recordset="city" wdg:displayfield="name_city; COUNT(id)" wdg:valuefield="name_city COUNT(id)" wdg:fkey="prov_city" wdg:triggerobject="province">
<option value="Select One">Select One</option>
COUNT(columnname) is a query function only and will do nothing when used outside a query. In this case you´ll need to create an "alias" within the query, example:
"SELECT field_one, field_two, COUNT(id) AS count_id ..."
..and use the alias "count_id" for the widget´s displayfield attribute like this:
I wonder what this is supposed to do, because the contents of the "valuefield" attribute is usually meant to only submit an integer value to the database, say, the id_city
I was able to do sql-> concat() as name_count and then just displayed that custom field
Thanks for your help.