Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
Cranners #1
Dynamic Checkboxes in Rich Forms
Hi, I am just in the process of working with rich forms in CF MX7. I am trying
to display checkboxes created from a query. The form is displayed, however, the
check box labels are all being set to the first record in the database. Please
could someone tell me how to get the correct labels to be displayed? See the
code below:
<cfquery name="GetCert" datasource="#application.dsn#">
select * from Certifications
order by CertName
</cfquery>
<html>
<head>
<title></title>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<cfform action="staffcert2.cfm" method="post" format="Flash" height="400">
<cfformgroup type="repeater" query="GetCert">
<cfinput type="checkbox" name="Certified"
bind="{GetCert.CertID[GetCert.CurrentRow]}"
label="#GetCert.CertName[GetCert.CurrentRow]#">
</cfformgroup>
<cfinput type="submit" value="Select" name="Submit" />
</cfform>
</body>
</html>
Cranners Guest
-
Dynamic Checkboxes
This is a rather simple situation that is killing my brain, maybe because I'm working on a Sunday night?! Anyhow, I am running a query against my... -
Checkboxes with the same name in Flash forms
This works fine until you add format="flash". Can anyone tell me how to get this works in a flash form, please? <cfform format="flash">... -
Rich flash forms and validation functions
Hi. I used to use the following to validate my forms: <!--- init form feilds ---> <cfparam name='form.FirstName' default=''> <cfparam... -
Multiple choice checkboxes in PDF forms
Hi, I tried searching on this and couldn't find anything! I want to be able to add a checkbox with 3 states, (blank, ticked and crossed). ... -
Dynamic checkboxes and INSERT into DB
"Frank Collins" <fcollins@mhca.com> wrote in message news:094101c352a8$7ca66990$a401280a@phx.gbl... Hmm..so you get your companyID on the same... -
nimer #2
Re: Dynamic Checkboxes in Rich Forms
2 problems you are trying to bind the value with client side markup {}
(processed on the client) and the labels with server size ## (processed by CF)
if you want to use cfloop to loop over the checkboxes, then you want the server
side version. However, if you are using the repeator cfformgroup then you are
processing the loop on hte client and need to use the client side version. try
this <cfformgroup type='repeater' query='GetCert'> <cfinput type='checkbox'
name='Certified' value='{GetCert.currentItem.CertID}'
label='{GetCert.currentItem.CertID}'> </cfformgroup> One bit of caution, the
column names are case-sensitive. So you need to make sure the CertID column, is
the same as column case in your db? or in the SQL? hth, ---nimer
nimer Guest
-
Cranners #3
Re: Dynamic Checkboxes in Rich Forms
Hi, Thanks, that worked. I tried using server side ## with CFLOOP but that
just gave me a blank form, no content. I changed my code to:
<cfloop query="GetCert">
<cfinput type="checkbox" name="Certified" value="#GetCert.CertID#"
label="#GetCert.CertID#"><br>
</cfloop>
Cranners Guest
-
johnnyred #4
Re: Dynamic Checkboxes in Rich Forms
I tried using the same code format with the repeater for checkboxes. The form displays fine, but all the checkboxes are checked when the form first displays...any ideas?
thanks...
johnnyred Guest
-
Cranners #5
Re: Dynamic Checkboxes in Rich Forms
From what I've read it looks like you have to use a checked='false' parameter with CFINPUT
Cranners Guest
-
johnnyred #6
Re: Dynamic Checkboxes in Rich Forms
Yes, I tried that. But the checkboxes are still pre-checked. Odd.
johnnyred Guest
-
Mike Nimer #7
Re: Dynamic Checkboxes in Rich Forms
This is a known bug, when using the repeator.
---nimer
"johnnyred" <webforumsuser@macromedia.com> wrote in message
news:cvij6m$ad9$1@forums.macromedia.com...> Yes, I tried that. But the checkboxes are still pre-checked. Odd.
Mike Nimer Guest
-
johnnyred #8
Re: Dynamic Checkboxes in Rich Forms
Well, that explains that...I will move onto something else.
Thanks.
johnnyred Guest



Reply With Quote

