Groups | Blog | Home
all groups > coldfusion flash integration > may 2005 >

coldfusion flash integration : CFFORMS Flash Dynamicaly using a check box


GeorgeWS
5/19/2005 8:12:34 PM
How do you show a check box, checked or unchecked when chosing from a list box
that calls a CFC. I have grid with names and when you select a name some text
fields are filled in with details about that person I want there to be
checkboxes also; but I dont know how to make it checked if the data says "yes"
or unchecked if the data says "no"? Any help would be great thanks!

George
GeorgeWS
5/25/2005 12:00:00 AM
Is anyone even try to use the cfforms on CF7? I see zero doc that have examples
of checkbox usage as well as radio buttons. Just the mention that you can do
this. 5 days of looking I think I have read every aritcle 4 times. Can Anyone
Help with a sample?

Thanks

hollyjones
5/25/2005 12:00:00 AM
Not sure if this is what you mean, but in the cfgridcolumn tag there is a
"type" property. If the column the query is referencing is a boolean, and you
set the type to boolean, it will show up as a checkbox. The checkbox will be
checked or unchecked based on the value of that field.

Holly
GeorgeWS
5/25/2005 12:00:00 AM
Thanks, but I am looking to dynamicaly show the checkbox checked or unchecked.
Call to a db filles a listbox; select a name and details get filled into a
number of cfinput type"text" boxs. I also have a bunch of checkboxs. but they
never show up checked. Here is what im doing:

<cfinvoke
component="CFC.Profiles"
method="ProfileSort"
returnvariable="ProfileSortRet">
</cfinvoke>


<cfform format="flash" name="GetUser" action="Action.cfm">

<cfformgroup type="horizontal">

<cfgrid name="User" query="ProfileSortRet" rowheaders="no" height="150"
width="150">
<cfgridcolumn name="Name" header="Name">
</cfgrid>
</cfformgroup>
<cfformgroup type="horizontal">

<cfinput type="checkbox" name="SalesRep"
bind="{User.dataProvider[User.selectedData]['salesrep']}" label="Sales Rep"
onChange="User.dataProvider.
editField(User.selectedData,
'SalesRep',
SalesRep.data);">

</cfformgroup>
</cfform>


All works great but the checkbox.

Thanks for looking
FEW
5/25/2005 12:00:00 AM
Try adding this onChange handler to your cfgrid:

onChange="SalesRep.selected=true"

GeorgeWS
5/26/2005 12:00:00 AM
Well that made the check box get checked, so thats cool. But when I select
another person the box stays checked. The SalesRep field from the DB is true or
false how can I use that to determine if the box is checked or not?
AddThis Social Bookmark Button