I've gotten numerous questions from the Ask a Jedi pod to the right. Here are a bunch of short questions answered in one post.
Q: Can you put a select control or radio buttons into a cfgrid?
A: Yes and No. The Applet version of cfgrid supports a drop down. Both versions allow you to specify boolean as a type with cfgridcolumn. This will display a checkbox, not a radio control.
Q: Is there a way to send the output of a cflocation call to a new page or for us firefox users a new tab?
A: No. Let's be honest though. Opening up new windows or tabs should be up to the user, not us web developers.
Q: Is there a way to set a submit button to be the default when you hit the enter key?
A: This is up to the browser. Most browsers, I believe, will default to submit if only one field exists. Like on my Ask a Jedi form to the right. I did a quick test in Firefox, and enter worked fine to submit a form, even with 2 text fields. I'm not sure I'd "trust" that to be very cross platform though.
Q: I have an application that has to be deployed multiple times on the same web server. I would like to be able to use an external configuration file (xml or ini) to set up all of the application level variables, including application name, client variable storage, etc. Do you know if it is possible to dynamically set these properties during the OnApplicationStart event when using Application.cfc or are those application properties already initialized by the time that event is called?
A: Yes, you can use dynamic application names. BlogCFC does this. You would need to read in the configuration information, then set the name like so:
Q: Could a BlogCFC install with a unique name on a site where the isp is using shared IPs make scopecache unclearable? Or only clearable by rebooting the server?
A: Only BlogCFC installs would have a conflict if any other blog had the same name on a box. Now they should be unique based on file path. Make sure you have the latest. If you still have trouble, try the BlogCFC support forums.
Q: We are looking for a small child displaced by Hurricane Katrina, where and how can we adopt one?
Not really a ColdFusion question, but I did say to ask anything. :) My wife is looking into this now. When I find something out, I'll post to The Adoption News.
Q: I'm looking for a ColdFusion consultant.
A: I'd use the CF-Jobs mailing list.
Q: Do you have to have flex installed to use drag and drop in cfform format=flash?
A: The presence of Flex doesn't change flash forms per se, so I think the answer to this is no. Can you do drag and drop in Flash Forms? Maybe. I haven't tried it. I'd check over at ASFusion.com.
Archived Comments
you *really* need to consider placing these into separate entries... that way the topic/subject will get pushed up in your google rankings!
Regarding using the Enter key to submit a form: remember that in some browsers (IE on the Mac comes to mind) using the Enter key means that you may not get the name of the button submitted as a form scope variable. Since I often look for the name of the button in the form scope, my form code may not process correctly in such instances.
> Is there a way to set a submit button to be the
> default when you hit the enter key?
Excluding cfform and cfgrid for a moment... In regular forms this is controlled by two things: the order in which the submittable input fields (submit/button/image/reset) appear, and the tabindex of each submittable field. Basically when you hit Enter in most browsers the first submittable input is activated, regardless of whether its specifically a type="submit", type="image", etc, they're all considered the same in this regard. If you wish to change the order this happens you need to set tabindexes for each field, then the submittable field with the lowest tabindex is what gets activated. These particularly come into play when you have large forms with several buttons with Javascript actions, or are using CSS to move your fields around.
Leif, normally I would, but I felt these questions were short and simple so it wouldn't really make much sense to have a bunch of tiny entries. Normally I care a _lot_ about Google, but in this case I do not.
I get an error when submitting a question: File not found: /morpheus/blog/index.cfm
What browser? I can't reproduce the error. Oh... are you going to www.camdenfamily.com/morphe..., or ray.camdenfamily.com?
I get that error too... when asking a question from http://ray.camdenfamily.com....
Another question--is is possible to jump to a specific accordion page from outside the cfform document? Im wondering how to open a specific accordion page upon page load if that is possible.
wierd - what browser?
I do not believe you can manipulate the form from outside the flash form.
I've been all over the web this week and can't find any sample code showing how to use multiple queries or a struct in a single CFForm. Seems the repeater panel pukes on structs. I want to display the full record of a user when selected from a data grid, and a list of categories they are part of, coming from a different table.
Right - the repeater will choke on a struct. You need to pass it a query. As for your particular item, showing user details when a person clicks - that is very doable. Does your original query, the one put in cfgrid, contain the user info? If so, it won't be a problem. If the data isnt' connected - I'd ask, why? You can rewrite your query to join them. Or you could modify the original query before passing it to cfform.
IE6 - standard flavor.
Regarding the drag and drop behavior in cfform:
This is possible in flash forms( without installing flex).For an example check out the MXNA reader they build over at www.ASFUSION.com/mxna. You can drag an drop an entry into the favourites section, pretty cool