Going print: ColdFusion Flash Forms CFDJ article
Yes! We made it to the ColdFusion Developer's Journal with an article titled: Constructing an application with Flash Forms from the ground up. The article can be read online, but the link to the source files does not work, so we are posting them here.
We hope you enjoy the reading and we would love to have your feedback.
Raymond Camden
c Crimmel
Do you know of any?
matt
mj AT jiboo.com
m@
Joe Stramel
Holly Jones
Lenny
mike
Nahuel
Thanks for your comments. :)
Lenny,
Querying a database is the same as queryNew. Make sure that you have the correct column names ( flash is case sensitive and sometimes are all Uppercase). You can check that with mygrid.columnNames
Mike,
That is a binding in the panel that is bound to the checkBox
Michael White
Nahuel
You can check this post about binding a cfselect to a grid
http://cfform.com/flashforms/invoke.cfm?objectid=0204C17F-4E22-1671-564CF4F0B33C3D29&method=full#
James
I loved this article! I am applying this to a form as we speak, but I have a question. I am pulling a date into a dateField from SQL server and am getting the long version. I have tried applying a mask, but it doesn't work when populating the form from the database. I just want MM/DD/YYYY. How do I go about that? Thanks!
How would the <cfsavecontent variable="previewBind"> be written?
Thanks!
James
((StartDate.text != "") ?"<br /><b>Start Date:</b>\t"+StartDate.text : "") +
A cfinput Datefield produces a long version date like this:
"Thu May 5 00:00:00 GMT+0900 2005"
But I'd like this: "May 5, 2005"
Also is there any way to get cfselect to reflect the database? In another Flash form it works fine. The following variable is definitely wrong:
((CourseID.text != "") ?"<br /><b>CourseID:</b>\t"+CourseID.text : "") +
from this cfselect:
<cfselect name="CourseID"
label="Course 1:"
query="courses"
display="Course"
width="300"
bind="{students.selectedItem.CourseID}"
selected="VARIABLES.CourseID" />
If anybody can point me to some resource where I can find the answer tha would be great.
Thanks
Byron
I'm having the same problem trying to format a date also. I have searched far and wide with no avail. I have not found any code examples. Anybody else have any luck?
Thanks
James
Well since posting I have made some progress. I was able to get the date to format to "dd/mm/yyyy" by changing it from "date/time" to "text" in the Access database. My attempts at masking the date within Access or CFINPUT didn't affect the latter format. In any case I'm happy that I could get rid of that long ("Thu May 5 00:00:00 GMT+0900 2005") date/time format.
As for the CFSELECT issue I could solve it by adding the "?EmpID=n" to the end of the URL. In my other project "?EmpID=n" was added to the URL during page processing.
If you find a way to further format the date let me know.
Cheers,
James
Nahuel
This is one way to do it. It's not a binding just you manually update a textfield.
You need to assign #onGridChange# to the onChange attribute in the cfgrid.
These are my variables you need to update yours.
"grid" is your cfgrid name
"time" is a column in a grid
"outputField" is a cfinput name
<cfsavecontent variable="onGridChange">
var pstDate = grid.selectedItem.time;
var monthNames:Array = mx.formatters.DateBase.defaultMonthNamesLong;
var dayOfWeek:Array = mx.formatters.DateBase.defaultDayNamesLong;
var postDate = dayOfWeek[pstDate.getDay()] + ", ";
postDate += monthNames[pstDate.getMonth()] + " ";
postDate += pstDate.getDate() + ", ";
postDate += pstDate.getFullYear() + " ";
var hours = pstDate.getUTCHours()+10;
postDate += (hours % 12)+":";
postDate += (pstDate.getMinutes() < 10)? "0"+ pstDate.getMinutes() + " ": pstDate.getMinutes() + " ";
postDate += (hours<12) ? "AM" : "PM";
outputField.text = postDate;
</cfsavecontent>
<cfgrid name= "grid" query="myquery" onchange="#onGridChange#">
<cfgridcolumn name="time" header="date">
</cfgrid>
<cfinput type="text" name="date" label="Date" bind="{grid.selectedItem.time}"/>
James
Thanks for the time and effort to offer a possible solution to my quandary. I'm not sure if I can use this since I already am using an onChange "getUrl" event with the cfgrid. Is it possible to use, i.e. combine, two onChange events?
Thanks again :)
Byron Raines
Thanks for you code. When I try to implement it (select a row in my grid and there is a value for date), I get an "undefined" in the input box (also no output is displayed in the Details panel. However, when I put in a date, the date is correctly displayed in the <cfinput> and also in the #binding# of the Details panel.
Can the cfinput name be the same as the grid column name?
Thanks
Byron
Byron
KomputerMan
Michael White
Michael White
p.s. Ray Camden supplied the onChange code to synchronize my cfselects on the edit form to the order cfgrid
Michael White
Michael White
Michael White
<cfformitem type="html" bind="<font face='Tahoma,Georgia,Verdana,_sans'><textformat leading='8' tabstops='[86]'><b>First Name:</b>/t #qryUserInfo.FirstName#</textformat></font>">
Everything works fine except the Tab. I can't figure the syntax to put the whole thing in cfsavecontent either which would be preferable.
I don't suppose you have any books coming out on Flash Forms in Coldfusion anytime soon...
michael White
Nahuel
Try:
{Number(apples.text) + Number(oranges.text)}
michael White
michael White
Nahuel
If you want more info about the Date object I recommend that you take a look at this link:
http://livedocs.macromedia.com/flash/mx2004/main_7_2/00001295.html
Michael White
I am about to give up on this problem and simply forgo the magic of seeing the date/time calculation appear for the end user, make the fields invisible and simply calculate them in the "process.cfm" page and hand it off to the cfc to update the database. I figure that's better programming anyway... MVC and all that.
Nahuel
If your dates are coming from the grid, they are already instantiated you don't need to use new for that. Actually, most of the time when you have a date in your database and you send that to your cfform it gets transformed into a date object. If this is not your case, tell me what you have.
Michael White
In a SQL query it might look like this:
SELECT StartDate, EndDate, BillRate, (DATEPART(ww, EndDate) + 52 * (DATEPART(yy, EndDate) - DATEPART(yy, StartDate)) - DATEPART(ww,
StartDate)) * 40 * BillRate AS EstBudget
FROM dbo.Projects
So my question is, how can I make something like that work in a flash form so that it calculates the budget as you update each field?
Michael White
Patty
Here's my code:
<cfsavecontent variable="featureBind">
{(
("<table><tr><td width='330' height='257' align='left' valign='middle' nowrap'") +
("background='" + photo_url.text + "'>") +
("<table width='330'><tr><td align='left'><br /><p class='featureHd'>") +
("<font color='" + headline_color.text + "'>" + headline_text.text + "</font>&nbsp;</p>") +
("<font color='" + body_text_color.text + "'>" + body_text.text + "</font></p><br />") +
("<a href='" + link_url.text + "' CLASS='featureLink_light'>") +
("<font color='" + link_color.text + "'>" + link_text.text + "</font></a></td>") +
("</tr></table></td></tr></table>")
)}
</cfsavecontent>
...
<cfformgroup type="panel" label="Preview" >
<cfformitem type="html" height="257" width="330" bind="#featureBind#"></cfformitem>
</cfformgroup>
Can anyone help?
Thanks,
Patty
Laura
It is not possible to add class definitions nor tables to the cfform html.
The only supported tags are:
http://livedocs.macromedia.com/flash/mx2004/main_7_2/00001040.html
In plain flash, you can use css classes, but not in cfform.
Patty Toretti
OK, I can format the text with <font> tags. But how do I get the image as a backround? What I'm wanting to simluate is a "feature" section like the area with the text over the woman and kid in the site http://egov.oregon.gov/DCBS/
(Yes, I work for the State of Oregon)
I can do this in Cold Fusion using CF, HTML and CSS. I'm trying to learn the new CFFORM Flash tags by trying to do the Admin side of setting up a Feature in a CFFORM as a test case.
Would I need to create a "still" Flash file to show this?
Thanks again, Patty
Nahuel
You can put your image with css check backgroundSize in the docs
http://livedocs.macromedia.com/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=ColdFusion_Documentation&file=part_cfm.htm
Michael White
http://www.macromedia.com/cfusion/webforums/forum/messageview.cfm?catid=22&threadid=1014611&highlight_key=y
I guess it's old news.
Chikowski
Laura
The regular cfselect lacks the additional data/columns required to bind other fields as it is done in the article example. If you want a list (not a dropdown) you can omit the headers in the cfgrid and it will look almost as a select.
If you really need a select, the only way would be to load it via remoting as it is described in http://www.asfusion.com/blog/entry/how-to-populate-a-cfselect-with-flash
in which case, you will have all the other columns available and you could bind them by mySelect.selectedItem.myColumn
Mary
Connie Decinko
Felipe Serrano
Instead of using the "contacts.cfc" component, I set it up to work with MySQL data base (Im a begginer) can any body help me to set up the cfquey scripts so I can edit and add information to the database? from the cf-application!
PLEASE!
Thanks in advance
Michele
Is it possible to enter a field prompt in a cfinput field? I have a phone field and I'm using a mask (999)999-9999. I want to put the prompt "enter area code first" in the field, but of course I don't want to submit this if the user does not enter a phone. Thanks for all the great examples. I have learned so much from your site!
Steve
Thanks
Steve
Kiley
For example, if the employee is 'Management', have a drop down of 'Departments' so you can re-assign the employee to a different department.
Is that possible?
Vale
Doug
Invalid token '/' found on line 39 at column 94.
The CFML compiler was processing:
a cfformitem tag beginning on line 39, column 12.
The error occurred in C:\Inetpub\wwwroot\Volleyball\family\accordion_eastCoast.cfm: line 39
37 : <cfinput type="text" name="reason" label="Reason" bind="{JaysonList.selectedItem.reason}"/>
38 : <!--- <a href="#gifts3.store#">Store</a> --->
39 : <cfformitem type="html" bind="<a href='{JaysonList.selectedItem.store}'>Store</a>"</cfformitem>
My website link shows I can get the info into a label, now I want to make it a link.
Thanks I have really enjoyed your examples.
Laura
Your life will be easier of you turn debugging on.
The reason why the form does not compile if you remove controls is that the preview panel expects to get data from them. You need to remove the parts where the removed controls are referenced.
Doug,
Your cfformitem is not properly closed:
<cfformitem type="html" bind="<a href='{JaysonList.selectedItem.store}'>Store</a>"</cfformitem>
It should be
<cfformitem type="html" bind="<a href='{JaysonList.selectedItem.store}'>Store</a>"></cfformitem>
Kiley
Thank you,
Kiley
xavy
Laura
yes, you can. Look at this article, it may give you some ideas on how to do it:
http://www.asfusion.com/blog/entry/coldfusion-flash-forms-macromedia-2
xavy
I used both the grids in the bind to make this work:
"{(grid1.selectedItem!=undefined)?grid1.selectedItem.description:''}
{(grid2.selectedItem!=undefined)?grid2.selectedItem.description:''}"
Any way to get debug info displayed in a flash form - I just get a white screen when there is an error in the action script and the flash form does not load - if there is some kind of error message as to what is wrong...
Thanks,
xavy
Laura
You need to enable "Flash Form Compile Errors and Messages" in the CF administrator
Debugging & Logging settings page
Joseph
While using this, I was working on modifying the code into an employee table where you can only modify your own contact information, but you can see everyone's.
The first step was to change the height of the editing window as such:
height="{(editShow.selected & (contactList.selectedItem.EmployeeID == #SESSION.EMPID#) ) ? 332 : 0}"
This worked just as I would expect - of course, that leaves the borders messing up the bottom, so the next step would be to change the visible tag to match the above, except instead of '332' and '0', it would be 'yes' and 'no'.
It didn't work. The flash form wouldn't even load.
Even simply changing visible to
visible="{(editShow.selected)?'yes':'no'}"
or
visible="{(editShow.selected == 'yes')?'yes':'no'}"
or any number of other variations on the ?: structure resulted in the flash form refusing to load up.
Are iff constructs somehow not allowed in the visible tag? Or am I just doing something wrong?
Nahuel
Try to use true or false because in actionScript yes and no doesn't work
visible="{(editShow.selected)? true:false}"
also this can work too
visible="{(editShow.selected)}"
Geoffrey Barth
Laura
The preview panel's data is bound to the columns of the datagrid. If you change the column names, you need to make adjustments to all the bound elements (including the form inputs). I would recommend you to read the article, as that is explained there.
Hope that helps
Timothy Pipe
Joseph
Timothy -
I'm sure there is, but I can't remember / find how to do it right now. If all else fails, you can always use components and remoting to create your own function.
Thomary
The problem: I have a cfselect that is required. The historical data in mysql database did not require that field and therefore the field is empty more often than not. When I try to delete (submit) and that required field is empty, it gives an error and shows the “Red” required field.
I’ve tried something with:
mx.validators.Validator.disable( this, "myFormName.myFieldName");
but this did not work. Not sure if I’m using it properly. I thought I needed to change the button from a submit to button but this did nothing.
I thought I could set this field to “abc” onClick of the Delete button, then run the delete query but this did not work either.
Any suggestions would be greatly appreciated.
Daniel
Daniel
Thanks so much for your site. I've learned so much from reading your articles.
Joseph
Either that, or use flash remoting to create some functions that'll run without having to refresh the page, and thus, losing the variables.
As for the 'programatically fire the onChange event', I think this might be what you're looking for:
http://www.asfusion.com/blog/entry/knowing-when-the-cfform-data-arrives
Daniel
I can pass the variable back using URL data, or a session variable but getting back into the script is the problem. According to Laura "Any ActionScript code we add to a cfform becomes part of the generated file. If anything in the generated file changes, then the form must be recompiled. Having a variable that changes in every request will make the form recompile each time, making the form slow to load, showing a blank screen (not the preloader)." She's right, my forms recompiles :( I am already using the code you referenced to select the first record. The bit I want to manipulate is: contactList.selectedIndex = 0;
Joseph
http://www.asfusion.com/blog/entry/asf-file-explorer-released
This is a bit complex, but it *may* be what you're looking for. At least, from your description, that's what I'd do.
Laura
If you need a variable, say a session variable, you can put it in a hidden field:
<cfinput type="hidden" name="myvar" value="#someOtherVar#">
and then reference it as:
myFormName.myvar
For example:
contactList.selectedIndex = myFormName.myvar;
(not the above code makes any sense, but you get the idea)
Daniel
Thanks for the feedback. I did indeed get the idea Laura and am happily passing variables to & fro, thank you very kindly. As for the other matter: I am using the onChange event for the grid to bind data to my selects (obliges to Ray Camden). Problem is, when the form loads a grid row is selected (thanks to that variable I'm passing around) but my selects have the first item in their list (default behavior) because onChange has not fired. Any thoughts?
Traci
Has anyone got some advice for a new person trying to learn how to implement this? I have a NaN displayed in the total field, and can't seem to get past that. I see two other posts here asking about this, but no one seems to have answered. Any assistance would be greatly appreciated.
Joseph
Traci
Has anyone got some advice for a new person trying to learn how to implement this? I have a NaN displayed in the total field, and can't seem to get past that. I see two other posts here asking about this, but no one seems to have answered. Any assistance would be greatly appreciated.
Traci
Joseph:
I have configured my query to remove nulls, and adjusted the grid to only show populated rows... it still says NaN. Do you have any other suggestions?
Traci
Joseph:
I have configured my query to remove nulls, and adjusted the grid to only show populated rows... it still says NaN. Do you have any other suggestions?
stephen
LOL
Stephen
xerrano
What I like to do with this great flash-form example is this:
How Can I have multiple CFSELECTs and INPUT Text Fields, where the user will select and enter the search criteria, and when the user submit his selection the CFGRID will be populated by this query. I think everything else will work as now; once the cfgrid gets populated and the user click on a row the info will show just like now.
Any ideas?
Thanks a lot
Felipe Serrano
stephen
<cfoutput>
var connection:mx.remoting.Connection =
mx.remoting.NetServices.createGatewayConnection
("http://#cgi.HTTP_HOST#/flashservices/gateway/");
var myService:mx.remoting.NetServiceProxy;
</cfoutput>
var var1:String ="";
var var2:Number =0;
var var3="";
var var4="";
var responseHandler = {};
responseHandler.onResult = function( results: Object ):Void {
if (results.length > 0) {
_root.yourgrid.dataProvider=results;
alert("Update Complete");
}
}
responseHandler.onStatus = function( stat: Object ):Void {
alert("Error updateing:" + stat.description);
}
myService = connection.getService("remote_flash_cfc_file_with_no_extention", responseHandler );
myService.getUpdate(var1,var2,var3,var4);
<!---this is the remote cfc --->
<cffunction name="getUpdate" output="false" description="Returns a query with names (var1,var2,var3,var4)"
access="remote" returntype="query">
<cfargument name="var1" required="true" type="string" />
<cfargument name="var2" required="true" type="numeric" />
<cfargument name="var3" required="true" type="string" />
<cfargument name="var4" required="true" type="string" />
<!--- if you want to work with any of your envir vars--->
<CFINCLUDE TEMPLATE="yourcfapplication.cfm">
<CFQUERY NAME="queryname" DataSource="databasename">
select * from database WHERE fieldname='#var1#'
ORDER BY fieldname DESC
</cfquery>
<!--- make sure this matches the name of the query used in the grid on your form you are updating--->
<cfreturn queryname />
</cffunction>
George
Thanks
Laura
I am not sure I understand your question. The example shows how to add a link to the preview panel. I know it is a little cryptic, but it is really a simple <a> tag.
Don
Thanks
Laura
You don't need JavaScript. Use onclick="getURL('yourpage.cfm')"
See http://livedocs.macromedia.com/flash/8/main/00001730.html
Don
I'm very new to this, so sorry for the basic questions...
What is the syntax to pass the selected record parameters to a different template?
Thanks,
Don
Laura
You would do something like:
onclick="getURL('yourpage.cfm?id=' + myGrid.selectedItem.someColumn)"
Tara
stephen
LOL,
Stephen
Jenny
I'm having a problem to pass variables using getURL. Let me try to descripe my situation, here it is:
I have this page (page1) the user can select different parameters (from drop down and radio buttons) to get a report according what the user select. The next page (page2) will display the data in cfgrid. I don't have any problems to pass the parameters using getURL to page2. Here is the code: onclick="getURL('page2.cfm?name='+preSelectName.value+'&status='+status.selectedData+'&sdate='+preSelectDate.selectedItem.data+'&loc='+preSelectLoc.selectedItem.data+'®='+regStatus.selectedData)". I have a print image icon on page2 which the user can click to get a Flash PDF file(page3) to print out the report. Here is the problem: I couldn't pass those same variables the user selected from the page2 to page3 using getURL. This is the code:
<cfinput type="image" name="print" align="right" src="print.gif" height="25" width="24" onclick="getURL('page3.cfm?name='+#URl.name#+'&status='+#URl.status#+'&sdate='+#URl.sdate#+'&loc='+#URl.loc#+'®='+#URL.reg#)" border="0">
I've been struggling with it for three days. Any help or hint will be great appreciated!!!
Thanks!
Jenny
Sam
Maybe is there any guide that I could use to get it working with Database like being able to get the insert,update and delete records functional.
sam
sam
Can you please help me completing this application , so that it would be able to interact with Acccess database and do a simple maintenance like add,delete and update or maybe there will be a print button to print the contact details in the preview panel.
I 'm new in Coldfusion and still learning very hard but I love and wants to use this address book personally.
I would buy anything you wish on your Amazon wist list.
Please help. please...
Laura
The problem that you have is the following:
In the first page, you do it correctly, you are using getURL(), which is an ActionScript function and constructing the url parameter using ActionScript variables. getURL('page2.cfm?name='+preSelectName.value);
But, in the second page, you mix ActionScript with CF variables, and that does not work, at least not the way you are doing it. If you would see the generated code, you would see syntax errors, as what you are writing would translate to something like:
getURL('page2.cfm?name='+ myName); where myName is not a variable, the actual name (a string) you want to pass.
In order to avoid recompiling of the form, I would store all the url variables in multiple or one hidden field and use the same syntax you use in the first page, but using myFormName.myHiddenFieldName as variables.
Sam,
This application uses form post, so any tutorial that shows you how to insert/delete/update data coming from a form should help you.
Sam
I'm aware of that, but I would like to have it in Flash remoting with CFC. I have sucessfully implemented the search function following the Real Estate example where I just used this UI instead of the actual UI in Real Estate.
But unable to do so for the records maintenance following the Real Estate example. I was confused as in that example the mls_id is not a autonumber whereas mine is access db is using an autonumber.
Maybe you could have another tutorial similar to the Real Estate where the mls_id is autonumber which is not editable.
Thanks
Alex
I'm developing an application like the Contacts application that when you click in the grid, the details of the record apears in other panel section of the cfform.
Well I already do that but I need to query other table when click the grid it display the values in the same panel that I tell you above. how can I do that?
This is my application.
http://www.comimsa.com.mx/temp/consulta.cfm
<cfscript>
contactsQuery = createObject("component","components.proveedor").getProveedor();
</cfscript>
<cfsavecontent variable="previewBind">
{"<textformat leading='8' color='red' tabstops='[86]'><font face='arial'>"}
{(
"<b>Nombre Comercial: </b>\t" + contactList.selectedItem.nombrecomercial+
"<br/><b>Tipo de persona: </b>" + contactList.selectedItem.tipopersona+
"<br/><b>RFC: </b>"+ contactList.selectedItem.rfc +
"<b> CURP: </b>"+ contactList.selectedItem.curp +
"<br /><b>Nombre o Razon Social: </b>\t"+ contactList.selectedItem.razonsocial +
"<br /><b>Calle y numero: </b>"+ contactList.selectedItem.calle +
"<br /><b>Colonia: </b>"+ contactList.selectedItem.colonia + " <b>CP: </b>"+ contactList.selectedItem.codigopostal +
"<br /><b>Ciudad: </b>"+ contactList.selectedItem.ciudad+"<b> Estado: </b>"+ contactList.selectedItem.estado
)}{"</font></textformat>"}
</cfsavecontent>
<cfsavecontent variable="previewBind4">
{"<textformat><font face='arial'>"}
{(
"<br /><b>CLASIFICACION DE PROVEEDORES (Sector y Giro declarado en el SAT)</b>"+
"<br /><b>Sector: </b>"+ contactList.selectedItem.sector+
"<br /><b>Subsector: </b>"+ contactList.selectedItem.subsector+
"<br /><b>Rama: </b>"+ contactList.selectedItem.rama+
"<br /><b>Subrama: </b>"+ contactList.selectedItem.subrama
)}{"</font></textformat>"}
</cfsavecontent>
<cfform name="addressBook" format="flash" width="100%" height="500">
<cfformitem type="script">
function applyFilter( term:String, grid:mx.controls.DataGrid, columns:Array ):Void {
var filterTerm:String = term.toString().toLowerCase();
if(filterTerm.length > 0) {
if(_global.unfilteredData[grid.id] == undefined){
if (_global.unfilteredData == undefined){
_global.unfilteredData = {};
}
_global.unfilteredData[grid.id] = grid.dataProvider.slice(0);
}
var filteredData:Array = [];
for(var i = 0; i< _global.unfilteredData[grid.id].length; i++) {
var item:Object = _global.unfilteredData[grid.id][i];
var added:Boolean = false;
for(var j = 0; j< columns.length; j++){
if(!added){
var value:String = item[columns[j]].toString().toLowerCase();
if(value.indexOf(filterTerm) != -1) {
filteredData.push(item);
added = true;
}
}
else {
break;
}
}
}
grid.dataProvider = filteredData;
}
else {
if(_global.unfilteredData[grid.id] != undefined) grid.dataProvider = _global.unfilteredData[grid.id];
}
}
</cfformitem>
<cfformgroup type="hbox" height="480">
<cfformgroup type="panel" width="450" label="Busqueda de Proveedores"><!--- panel to contain the contact list --->
<cfformgroup type="horizontal">
<cfinput type="text" name="term" onchange="applyFilter(term.text,contactList,['nombrecomercial','ciudad','estado'])" label="Filtrado por:">
<cfgrid name="contactList" query="contactsQuery" rowheaders="false" height="400">
<cfgridcolumn name="nombrecomercial" header="Nombre Comercial" width="200"/>
<cfgridcolumn name="ciudad" header="Ciudad" width="100"/>
<cfgridcolumn name="estado" header="Estado" width="100"/>
</cfgrid>
</cfformgroup>
</cfformgroup>
<cfformgroup type="vbox">
<cfformgroup type="panel" label="Detalles"><!--- panel to contain the contact preview --->
<cfformgroup type="hbox" style="backgroundColor:##E9EAFF; marginLeft:10; marginTop:10">
<cfformitem type="html" bind="#previewBind#"></cfformitem>
<!-------><cfformitem type="html" bind="#previewBind4#"></cfformitem>
</cfformgroup>
</cfformgroup>
<cfformgroup type="panel" label="Edit"><!--- panel to contain the edit form --->
</cfformgroup>
</cfformgroup>
</cfformgroup>
</cfform>
Calvert
Joseph
Jenny
Tad
Peter Tanswell
The only thing I cant see at this stage is how validation of fields in the edit form has been done. Especially the Zipcode.
If I have a zzip code of less than 5 chars the field is highlighted.
Can you advise where the validation of this field is done.
Many thanks
Peter
Jim
Thanks
Jim
Adrian
When you select an item in the select it should load the grid with the correct data.
I'd then like to be able to check the data I want in the grid and save it.
This image will show what I am trying to do.
http://i21.tinypic.com/2d6w1hd.jpg
Can anyone help?
Thanks
Scott
<cfform action="servicerequest.cfm" name="servicerequest" format="flash" style="themeColor:##2B52FF;" width="100%">
<cfformgroup type="hbox" height="275">
<cfformgroup type="vbox" style="verticalGap:4">
<cfformgroup type="panel" height="275" label="Oppliger Service Request"
style="panelBorderStyle:'roundCorners'; backgroundColor:##E9EAFF; headerColors:##CED7FF, ##D9E0FF;">
<cfformgroup type="hbox">
<cfformgroup type="hbox">
<cfinput type="text" name="firstName" label="Your First Name:" required="true" validate="noblanks" message="First Name is required" />
<cfinput type="text" name="lastName" label="Your Last Name:" required="true" validate="noblanks" message="Last Name is required"/>
<cfinput type="text" name="title" label="Your Title:" required="false" />
<cfinput type="text" name="phone" label="Your Phone:" required="true" message="Telephone Number is required" mask="999-999-9999" />
<cfinput type="text" name="email" label="Your Email:" required="true" validate="email" message="A valid email address is required" />
</cfformgroup>
<cfformgroup type="hbox">
<cfinput type="text" name="company" label="Company:" required="true" validate="noblanks" message="Company Name is required" />
<cfinput type="text" name="address" label="Address:" required="true" validate="noblanks" message="Address is required" />
<cfinput type="text" name="city" label="City:" required="true" validate="noblanks" message="City is required" />
<cfinput type="text" name="state" label="State:" required="true" validate="noblanks" message="State is required" />
<cfinput type="text" name="zip" label="Zip:" validate="zipcode" required="true" message="Zip Code is required" />
</cfformgroup>
</cfformgroup>
<cfformgroup type="vertical">
<cftextarea name="comments" height="45" width="200" label="Comments:"></cftextarea>
<cfformgroup type="horizontal" style="horizontalAlign:'right'">
<cfinput type="submit" name="deleteContact" value="Reset" style="borderThickness:1;" />
<cfinput type="submit" name="submit" value="Submit" style=" borderThickness:1;"/>
</cfformgroup>
</cfformgroup>
</cfformgroup>
</cfformgroup>
</cfformgroup>
</cfform>
sabiha Chowdhury
Joe
Creid Norn
And when I press the Add Contact button, it shows "undefined" in all input boxes.
Thanks in advance. ^_^
-sorry, I'm still a newbie with CF- ^_^