CFForm.com is live!
It's official cfform.com is live. This new site has two roles, the first is a community exchange for XML Form skins and rules. The second role is a central place to post tips, tricks, examples, sightings of cfform (flash forms, XML Forms, and HTML forms).
If you've built a skin or even a simple rule, post your skin on this site. If you've figured out a simple actionscript trick when working with flash forms, send me an email and I'll post it. If you've seen a site using flash forms send me an email (if it's internal, a short description and some screen shots work too). If you have any other ideas for the site, let me know.
CFForm.com


onKeyDown="if(Key.isDown(Key.ENTER)) {submitForm(btnfind)}" It actually finds the Submit button (btnfind) and worked like a charm! Now you can do searches via, Button, Spacebar, or Enter key!
I´m trying to put a simple cfselect into a cfform but getting confused. I´m very new to actionscript and cf.
My cfinputs work fine outputting in the cfgrid:
<cfinput type="DateField" name="DTLEAVE" label="ACTION DATE:"
bind="{companyGrid.dataProvider[companyGrid.selectedIndex]['DTLEAVE']}" onChange="companyGrid.dataProvider.editField(companyGrid.selectedIndex, 'DTLEAVE', DTLEAVE.text);">
The problem is here when I have tried to incorporate the comments in this thread and it doesn´t throw an error but doesn´t output the db entries as the cfinputs do. I am a bit out of my depth-please help!! Thanks:
<cfselect name="NEXTSTEP" label="Next"
onChange="NEXTSTEP.selectedIndex=NEXTSTEP.selectedIndex">
<option value="SEND FAX">SEND FAX</OPTION>
<option value="SEND EMAIL">SEND EMAIL</OPTION>
<option value="CALL AND EMAIL">CALL AND EMAIL</OPTION>
<option value="CALL">CALL</OPTION>
<option value="NO">NO</OPTION>
<option value="MEETING">MEETING</OPTION>
</cfselect>
Hi Mike,
Thank you for your reply and the link. What I am trying to do is bind a select list to a grid, and having problems looping over all of the items in the select list comparing them to the value I want selected. For example if the db entry is "Call" then that is selected in the cfselect.
I have a a cfgrid which is outputting the cfquery fine in the cfgrid for the cfinputs but not the cfselect, and the cfselect doesn´t change when I select a new record to display:
<cfquery name="getcompany" datasource="cfcodeexplorer">
select * from COMPANY
</cfquery>
The values are:
send fax, send email, call and email, call, send letter presentation, no, meeting
Following your link that you send me I get the following code for the cfselect but I don´t understand how to loop over the values with cfscript and don´t know what to do if the value is "null".
<cfselect name="NEXTSTEP" width="200" size="1" label="NEXT STEP" onchange="companyGrid.dataProvider.editField(company.selectedIndex, 'NEXTSTEP', NEXTSTEP.selectedItem.data);">
<option value="SEND FAX">SEND FAX</OPTION>
<option value="SEND EMAIL">SEND EMAIL</OPTION>
<option value="CALL AND EMAIL">CALL AND EMAIL</OPTION>
<option value="CALL">CALL</OPTION>
<option value="SEND LETTER PRESENTATION">SEND LETTER</OPTION>
<option value="NO">NO</OPTION>
<option value="MEETING">MEETING</OPTION>
</cfselect>
Thank you very much for any pointers, Best Regards, Edward
To have more than one select binding to a cfgrid just add actionscript to the cfgrid. By trial and error I worked out that you do the following:
On the cfgrid(this uses three cfselects):
<cfgrid name="UsersGrid" format="Flash"
query="qNames" rowheaders="No"
onchange="for (var i:Number = 0; i<state.length; i++) {if
(state.getItemAt([i]).data == UsersGrid.selectedItem.state)
state.selectedIndex = i} for (var i:Number = 0; i<meetingtime.length; i++)
{if (meetingtime.getItemAt([i]).data == UsersGrid.selectedItem.meetingtime)
meetingtime.selectedIndex = i}
for (var i:Number = 0; i<dept.length; i++) {if (dept.getItemAt([i]).data ==
UsersGrid.selectedItem.dept) dept.selectedIndex = i}
for (var i:Number = 0; i<city.length; i++) {if (city.getItemAt([i]).data ==
UsersGrid.selectedItem.city) city.selectedIndex = i}">
On the cfselect:
<cfselect name="dept" width="200" size="1" label="Dept."
onchange="UsersGrid.dataProvider.editField(UsersGrid.selectedIndex, 'dept',
dept.selectedItem.data);">
<option value="None">None</OPTION>
<option value="Cundinamarca">Cundinamarca</OPTION>
<option value="Antioquia">Antioquia</OPTION>
<option value="Boyaca">Boyaca</OPTION>
<option value="Sucre">Sucre</OPTION>
<option value="Atlantico">Atlantico</OPTION>
</cfselect>
Explanation:
To add a new cfselect just add in the onchange between the "" the
following:
for (var i:Number = 0; i<state.length; i++) {if (state.getItemAt([i]).data
== UsersGrid.selectedItem.state) state.selectedIndex = i}
change the field in this example "state" to your field name.
As Mike says it is VERY VERY important to WATCH OUT FOR UPPER AND LOWER CASE - actionscript is case sensitive although
coldfusion isn´t. Try to have your field names all uppercase and put all of the references in upper case as well then you won´t get problems. good luck.
It would be most appreciated if you could help me out.
I have finished creating an application using the Flex/ColdFusion application wizard. I would like to use the login system that you wrote for it but do not have the skills to complete the code.
I have been trying for a week to hire someone that will help me accomplish this. Unfortunately I have had no luck finding anyone. Would you be able to refer me to someone?
The application uses ColdFusion MX7 and SQL Server 2005 as the back end. The database component for the login has been completed.
Thanks for your help.