Copy link to clipboard
Copied
I want to add new option and enter that in table in cfselect.
Like it does in to formate ="flash" editable ="Yes".
Can I do same function it does with flash format edit ="Yes ", without flash? in coldfusion?
or
if I put one option like "other" and put condition like if "form.test" eq "other" than than give form to enter value for other before compliting or submiting form?
How can I do this?
Copy link to clipboard
Copied
If this is a standard HTML form, then it necessarily is going to submit once, and the value submitted (hence, seen by CF) will be "other." What you choose to do with that is up to you.
One thing that occurs to me is that you could add a little custom JavaScript to the form that would specifically look for "other" and pop-up a client side input box to gather the value. The JavaScript would then install the value into a hidden submit-field. Thus, when CF gets the posted record, it will see "other" and the Javascript-supplied choice.
There might be a funky way to do this automagically ... CF has many JavaScript tricks up its sleeve ... but I do not know what it is. "Bound fields?" I dunno. Either way the special-effect is going to be achieved using JavaScript: the question becomes whether you have to be the one to write it.