RE: Consistency of Submitted Form Fields
I think that's the best solution too. This way, you will always have a field called something like "OrderedFieldNames" that will always be in the order of the form variables on the form (no matter who changes what). As long as no one ever changes your javascript, your resulting form.OrderedFieldNames variable will always have the list in the order in which they were on the page. One question for someone else, as I don't know the answer... is the order of the form fields array in javascript affected by the 'tabindex' property? Dave -Original Message- From: Robyn [mailto:[EMAIL PROTECTED] Sent: Thursday, August 11, 2005 11:46 AM To: CF-Talk Subject: Re: Consistency of Submitted Form Fields Dawson, Michael wrote: > One solution I thought of would be to specify a list of the form fields > in the specific order. However, that leads to duplication of code and > then what happens when I "forget" to add a field to the "sort order" > list? Use JavaScript to traverse through all form fields on submit, and build the list on the fly. Stick the generated list in a hidden form field that you know will always be there. That way, no issue with forgetting to update a field or worrying about form.fieldnames! ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:214576 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Consistency of Submitted Form Fields
On Thursday 11 August 2005 16:35, Dawson, Michael wrote: > mish-mash of worst-practices. ;^) > All in all, the form mailer will only be used by departmental web sites > that just need a quick email form. This is not intended to be used, at They don't need the complicated formating controled by form field names then, do they :-) If it's worth doing, it's worth doing right. -- Tom Chiverton Advanced ColdFusion Programmer ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:214564 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Consistency of Submitted Form Fields
Dawson, Michael wrote: > One solution I thought of would be to specify a list of the form fields > in the specific order. However, that leads to duplication of code and > then what happens when I "forget" to add a field to the "sort order" > list? Use JavaScript to traverse through all form fields on submit, and build the list on the fly. Stick the generated list in a hidden form field that you know will always be there. That way, no issue with forgetting to update a field or worrying about form.fieldnames! ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:214563 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Consistency of Submitted Form Fields
A little JS would make this pretty easy. A simple function that is triggered on submit of the form could easily parse through the form array and delineate the fields into a particular field for this purpose. This way it is based on the structure of the form and does not rely on how the browser, web server and app server handle form fields. Something I would not be comfortable in relying on just because of all the possible variations and combinations. -- Ian Skinner Web Programmer BloodSource www.BloodSource.org Sacramento, CA "C code. C code run. Run code run. Please!" - Cynthia Dunning Confidentiality Notice: This message including any attachments is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender and delete any copies of this message. ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:214561 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Consistency of Submitted Form Fields
Also, let me add that the web designer also wants field names to contain spaces and colons to help control formatting and other display properties. I think this can be pretty flexible, but to me, it seems like a mish-mash of worst-practices. ;^) All in all, the form mailer will only be used by departmental web sites that just need a quick email form. This is not intended to be used, at all, by any real, or mission-critical web sites I build or maintain. Our dept just doesn't have the time to build every single form and form processing page that the other depts want. Mike -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, August 11, 2005 10:21 AM To: CF-Talk Subject: RE: Consistency of Submitted Form Fields Personally, I wouldn't count on it. That's something out of your control and it's always dangerous to 'count on' something out of control. Besides, as far as I know, no one here can tell the future. ;-) Why would they need to be in a certain order anyway? What are you trying to do? Maybe there's another solution to your issue. Dave ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:214559 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Consistency of Submitted Form Fields
We are building a simple form mailer script and would like to email the form fields in the same order as they appear on the page. One solution I thought of would be to specify a list of the form fields in the specific order. However, that leads to duplication of code and then what happens when I "forget" to add a field to the "sort order" list? I, personally, don't like relying on this action, either. I have full control over how this will work, but I'm trying to build a solution that is flexible enough that the web designer can work with. I'm alright with trying it, but once the browser/CF fail to send fields in the desired order, I can figure out a different way. The web designer "used to do it" this way and I want to be flexible and try it, but I can also forsee what happens when you rely on things that are not part of a standard. Thanks M!ke -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, August 11, 2005 10:21 AM To: CF-Talk Subject: RE: Consistency of Submitted Form Fields Personally, I wouldn't count on it. That's something out of your control and it's always dangerous to 'count on' something out of control. Besides, as far as I know, no one here can tell the future. ;-) Why would they need to be in a certain order anyway? What are you trying to do? Maybe there's another solution to your issue. Dave ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:214557 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Consistency of Submitted Form Fields
Personally, I wouldn't count on it. That's something out of your control and it's always dangerous to 'count on' something out of control. Besides, as far as I know, no one here can tell the future. ;-) Why would they need to be in a certain order anyway? What are you trying to do? Maybe there's another solution to your issue. Dave -Original Message- From: Dawson, Michael [mailto:[EMAIL PROTECTED] Sent: Thursday, August 11, 2005 11:05 AM To: CF-Talk Subject: Consistency of Submitted Form Fields When a form is submitted, the form.fieldNames variable contains the fields in the same order as they appear on the form page itself. Can I actually always count on this to be true? Is this a per-browser implementation or is it a standard? Is there a good chance that CF will one day sort the field names and cause my logic to break? Thanks M!chael A. Dawson Database Administrator and Manager of Web Applications Office of Technology Services University of Evansville 1800 Lincoln Avenue Evansville, IN 47722 812-488-2581 MSN Messenger ID: [EMAIL PROTECTED] "There are 10 types of people in the world: Those who understand binary numbers and those who don't." ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:214556 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
Consistency of Submitted Form Fields
When a form is submitted, the form.fieldNames variable contains the fields in the same order as they appear on the form page itself. Can I actually always count on this to be true? Is this a per-browser implementation or is it a standard? Is there a good chance that CF will one day sort the field names and cause my logic to break? Thanks M!chael A. Dawson Database Administrator and Manager of Web Applications Office of Technology Services University of Evansville 1800 Lincoln Avenue Evansville, IN 47722 812-488-2581 MSN Messenger ID: [EMAIL PROTECTED] "There are 10 types of people in the world: Those who understand binary numbers and those who don't." ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:214554 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54