[ic] Re: select widget with lookup_select and sql
ir.gath at gmail.com
Wed Mar 21 11:43:48 EST 2007
> When editing an image I'd like to have a list of rooms in a drop down
> based on rooms related to the same listing as the image. I've tried
> putting a query in the extended.lookup_query box in the admin UI (it's
> labeled 'SQL for options'). The query looks like this:
> SELECT room_id, room_name FROM listing_rooms WHERE listing_id = [cgi item_id]
I've spent more time trying to get this to work the way I expect and
couldn't get the sql to interpolate. I also looked into how to
populate the select widget manually, but had no luck there.
The solution I've been working on is to create a file to include using
'include form' in the UI. I set some scratch values to indicate what
query, what to name the box, etc... I'd rather be able to use the
widgets provided by IC for this, but it doesn't seem possible in this
case. Regardless, this solution does get the box displayed.
The problem is that I have to remove the field (room_id) to remove the
standard select box which is displaying the wrong content. Once this
is done the mv_data_fields form element doesn't contain room_id so the
custom select box I've built is ignored.
I must be on the wrong track for solving this. Does anyone have any
suggestions on a different direction or a better way to accomplish
More information about the interchange-users