Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
TheEngineer #1
bing to cfselect query value
I am trying to have some cf dynamic text display a value for a certain
recorset_id which is bound to a cfselect value as you can see in my code i want
the cfformitem text to display the rent for the apartment
(vacancies.rent[apartment_id]) apartment_id is the primary key in the recordset
of the apartments.
for example
<cfselect id="apartment" name="apartment" label="Vacent Apartment"
required="yes" query="vacancies" value="apartment id" display="AptAddress"
width="375"></cfselect>
<cfformitem type="text" name="rent" bind="{apartment.value}"></cfformitem>
-------- this works fine and displays the apartment_id (1 or 20 or 25 ect) but
i want it to show rent value(price) for the 1 or 20 or 25th record in the
query..........kinda like this
<cfformitem type="text" name="rent" bind="{vacancies.rent[1]}"></cfformitem>
........or
<cfformitem type="text" name="rent"
bind="{vacancies.rent[20]}"></cfformitem>........or
<cfformitem type="text" name="rent"
bind="{vacancies.rent[25]}"></cfformitem>.........ect. you get the point
------------- these cf statements all work fine and show the 1 or 20 or 25th
record value for rent.....however this is not bound to the cfselect at all.
-----basically it needs to work in this way....
<cfformitem type="text" name="rent"
bind="{vacancies.rent[apartment.value]}"></cfformitem>
----where vacancies.rent is the database record and apartment.value is the
index of the record bound to the cfselect.....the problem is this doesn't work.
-----i tried for 8 hours yesterday with a broken arm to get this to work. i
searched these forms and MM live docs intensively but could only find info on
binding with queries indexes on cfselect to cfgrid..ect...
Please anyone that could help me with this, im sure easy problem, i would be
very greatful.
<cfform id="form" name="form" method="post" action="Move-In-A-Tenant.cfm"
format="flash" preloader="true" height="1000" skin="haloblue" wmode="opaque">
<cfformitem type="html">
<div class="story">
<h3><b>Step 1: Enter apartment info</b></h3>
</div>
</cfformitem>
<cfinput type="datefield" name="moveindate" width="166" label="Move
In Date" required="yes" message="Please specify the move in date.">
<cfselect id="apartment" name="apartment" label="Vacent Apartment"
required="yes" query="vacancies" value="apartment id" display="AptAddress"
width="375"></cfselect>
<cftextarea name="textarea" label="Special Comments"
width="375"></cftextarea>
<cfformitem type="text" name="rent"
bind="{vacancies.rent[apartment.value]}"></cfformitem>
<cfformitem type="hrule"></cfformitem>
TheEngineer Guest
-
How to bing a collection with sub-collection to grid
I have a collection of objects (say Customers for example). Each Customer Object has a collection of orders. When I bind such complex type to... -
cfselect options dependent on choice from other cfselect
I have 2 cfselects. 1st is category, 2nd is sub category. both are populated from database queries, but the options from the sub cat vary based... -
cfselect how too?
I have a CFSELECT tag in a form the form submits an pull back a graph of the customers sales. It works but I want the CFSELECT tag to show the name... -
Populating SELECTED of CFSELECT with different query
I am trying to populate a CFSELECT from a query (which is working fine), but I want the SELECTED value to come from a different query. The values... -
CF7 BIND CFSELECT to populate a 2nd & 3rd CFSELECT
Please could some show code of how this is done: CF7 - Flash page Question: How do I bind these cfselect dropdown lists to one another as per the...



Reply With Quote

