Ask a Question related to Coldfusion Database Access, Design and Development.
-
Captain Ru #1
How to: Populate listbox with fields from DB
I created a .cfm page using various queries to output a company phone list (1.
lname alpha, 2. dept, 3. branch). I then have it create a .PDF using the
<cfdocument> tag.
Now I am trying to recreate this site but allow the user to manually choose
the parameters in which to query, creating a custom .pdf.
The problem I am having is that I do not know how to call the fieldnames
themselves to be available for queries, and I would like them, once selected,
to not be available in the next list box. I'm also not sure if the #index# used
in the select is correct. Maybe it should be #recordindex# ?
I have my select * query, and <form action = "phonebook.cfm" method = "post">
<cfoutput query = "getfields">
<select name = "param#index#">
<option value = DON"T KNOW WHAT TO PUT HERE>
</select>
</cfoutput>
</form>
Maybe my logis isn't right as well.
Captain Ru Guest
-
Populate form fields with Unicode data using FDF Toolkit
Does anyone know about populating PDF Form dynamically with Unicode (read Arabic) data?! It displays English data correctly but displays jumbled data... -
Combining 2 Fields Using ListBox.DataTextField
I have a ListBox control which I am using with databinding. However, the text that I want to be displayed is a combination of two fields (in this... -
listbox to populate a listbox
I am trying to use a listbox that I have setup using flash remoting call to a db. What I want to happen is when you click on a item in first the... -
Populate form values based on previous same form fields
This message is cross posted in alt.comp.lang.php & comp.lang.javascript I have a form for a user to input an establishment's hours and what time... -
How to populate the form fields from another drop down list
Hello, I would like to populate form fields from one drop down list in the same page. The drop down list's value is from SQL database. When... -
warddc #2
Re: How to: Populate listbox with NAME of fields from DB
the cfquery tag returns a property called columnlist which is the name of each column returned from the query. so you could do a select * and then loop over columnlist.
dave.
warddc Guest
-
Captain Ru #3
Re: How to: Populate listbox with NAME of fields from DB
So I'm going to want columnlist and loop through to index. Is there a
columncount, like the recordcount attribute?
That way I could use that to determine how many 'option value's i will use. If
possible have....
Maybe I'll have one listbox, then have another popup if a record is selected
for use in a query OR allow multiple selections via one listbox....
I want this to be as user-friendly and error-prone free. Thanks for your help!
Captain Ru Guest
-
warddc #4
Re: How to: Populate listbox with NAME of fields from DB
you don't need to know how many options tags to create. just loop over the
list that was returned.
<cfloop index="item" list="#myquery.columnlist#">
<option><cfoutput>#item#</cfoutput>
</cfloop>
better yet just use a cfselect form object and let it build the options
automatically.
<cfselect name="myselect" query="myquery" display="columnlist"
value="columnlist">
d
d.
warddc Guest
-
Captain Ru #5
Re: How to: Populate listbox with NAME of fields from DB
well what I mean is that I want the user to custom create a phonelist based on
parameters to be shown.
This will let the user select from the first listbox to display the Lname, the
next box the FName, third box Phone...Ext...and so on. The number of available
boxes to choose shouldn't exceed the number of columnlist elements.
I could also achieve the same results allowing multiple selections from one
listbox.
However, the other way could allow the user to custom sort as well based on
all those criteria.
Captain Ru Guest



Reply With Quote

