Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
Monkey Fur #1
Flash Form conditional display
I'm trying to create a form that displays different variations of text input
fields as a function of radio button choices. Example: if a user selects
"Sphere" for the shape, the form displays only the text input field "Diameter".
Selecting "Cylinder" would produce "Diameter" and "Length" inputs. (code
fragment attached)
I've seen examples of how to pull this off with DHTML, but it doesn't work
inside of Flash Forms. Is there a way to use Actionscript in an onClick event
of one form element to control the attributes of another form element (i.e.,
changing the "visible" switch in a cfinput tag from "yes" to "no")?
<cfformgroup type="horizontal">
<cfinput type="radio" name="shape" value="Sphere" Label="Sphere" />
<cfinput type="radio" name="shape" value="Cylinder" Label="Cylinder" />
<cfinput type="radio" name="shape" value="Block" Label="Block" />
</cfformgroup>
<cfformgroup type="horizontal" visible="no" enabled="yes">
<cfinput type="text" name="SphDia" size="15" maxlength="15" width="15"
label="Diameter (in):"/>
</cfformgroup>
<cfformgroup type="horizontal" visible="no" enabled="yes">
<cfinput type="text" name="CylDia" size="15" maxlength="15" width="50"
label="Diameter (in):"/>
<cfinput type="text" name="CylLen" size="15" maxlength="15" width="50"
label="Length (in):"/>
</cfformgroup>
<cfformgroup type="horizontal" visible="yes" enabled="yes">
<cfinput type="text" name="DimX" size="15" maxlength="15" width="50"
label="Dimension X (in):"/>
<cfinput type="text" name="DimY" size="15" maxlength="15" width="50"
label="Dimension Y (in):"/>
<cfinput type="text" name="DimZ" size="15" maxlength="15" width="50"
label="Dimension Z (in):"/>
</cfformgroup>
Monkey Fur Guest
-
Conditional Display of DataGrids
Hi I am using Cairngorm Architechture in my application. My application parses a XML file and generates datagrids based on the tags in the XML... -
conditional data binding in flash form
I am having trouble with grid binding in a flash form. When an item is selected in the grid, Detailed info will show up in the panel below the grid.... -
Flash Form won't display
I have an issue that when I add a cfinput tag such as checkbox to a flash form, the form stops appearing. See code attached. Code that works: ... -
Flash Form doesn't display
We have CF MX 7 multi-server configuration on Windows 2003 server. Recently we applied the Windows NTLM Authentication to our web site based on... -
Flash Form doesnt display
has there been a resolution to this? CFIDE is in my default web root, but I still get a blank space with the small graphic in the to left corner... -
Mike Nimer #2
Re: Flash Form conditional display
yes,
try this.
<cfinput type="radio" name="shape" value="Sphere" Label="Sphere"
onClick="SphDia.visible = true" />
<cfinput type="text" name="SphDia" size="15" maxlength="15" width="15"
label="Diameter (in):"/>
remember though, while your laying out the form. Visible will hide/show the
field but it won't hide the label and the field will still take up the space
as if it was visible. So lay things out accordingly. You might also want to
enable/disable the fields (onClick="SphDia.enabled = true") instead of
setting visible, this might be a better experience
---nimer
"Monkey Fur" <webforumsuser@macromedia.com> wrote in message
news:cv0jjg$j53$1@forums.macromedia.com...> I'm trying to create a form that displays different variations of text
> input
> fields as a function of radio button choices. Example: if a user selects
> "Sphere" for the shape, the form displays only the text input field
> "Diameter".
> Selecting "Cylinder" would produce "Diameter" and "Length" inputs. (code
> fragment attached)
>
> I've seen examples of how to pull this off with DHTML, but it doesn't work
> inside of Flash Forms. Is there a way to use Actionscript in an onClick
> event
> of one form element to control the attributes of another form element
> (i.e.,
> changing the "visible" switch in a cfinput tag from "yes" to "no")?
>
>
> <cfformgroup type="horizontal">
> <cfinput type="radio" name="shape" value="Sphere" Label="Sphere" />
> <cfinput type="radio" name="shape" value="Cylinder" Label="Cylinder"
> />
> <cfinput type="radio" name="shape" value="Block" Label="Block" />
> </cfformgroup>
>
>
> <cfformgroup type="horizontal" visible="no" enabled="yes">
> <cfinput type="text" name="SphDia" size="15" maxlength="15" width="15"
> label="Diameter (in):"/>
> </cfformgroup>
>
> <cfformgroup type="horizontal" visible="no" enabled="yes">
> <cfinput type="text" name="CylDia" size="15" maxlength="15" width="50"
> label="Diameter (in):"/>
> <cfinput type="text" name="CylLen" size="15" maxlength="15" width="50"
> label="Length (in):"/>
> </cfformgroup>
>
> <cfformgroup type="horizontal" visible="yes" enabled="yes">
> <cfinput type="text" name="DimX" size="15" maxlength="15" width="50"
> label="Dimension X (in):"/>
> <cfinput type="text" name="DimY" size="15" maxlength="15" width="50"
> label="Dimension Y (in):"/>
> <cfinput type="text" name="DimZ" size="15" maxlength="15" width="50"
> label="Dimension Z (in):"/>
> </cfformgroup>
>
Mike Nimer Guest



Reply With Quote

