Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
blkcop #1
Limiting Number of Checkboxes
I am hoping someone can help with this. I am running a query which selects all
members of staff. This is then output to a form with checkboxes assigned with a
delimiter and the staff id as the name of the checkbox (ie - MOD_#staff_id#).
I want to be able to select ONLY ONE checkbox from the entire form (there are
only about 10 records in the table) and RESTRICT ALL OTHERS from being selected
once a checkbox has been marked off. In other words, once you select a checkbox
you should not be able to select anything else unless you clear the one you
previously selected, or ideally if you select more than one it automatically
clears the previously selected box.
Any help will be appreciated.
blkcop Guest
-
limiting the number of copies printable from a PDF
Is it possible to set a limit on the number of copies printable from a PDF file for proprietary material? -
Limiting number of control instances?
Hey all, Is there a way of limiting the number of instances of a server control that the user can put on a form? I'm writing an interfaceless... -
limiting the number of records returned
Hi all, The problem I am having is that I built an online query system. The problem is if the search critera is to open or loose, the coldfusion... -
sort from the smallest number to the highest number
Hi Just say I want to sort the row by using the fifth column data as reference from the smallest the largest number, if using sort, It will give... -
Huge number of checkboxes to be populated from database
I have a database with 90-odd true-false values that I need to display on a webform as checkboxes. There are also some other values (numbers and... -
Jibé #2
Re: Limiting Number of Checkboxes
blkcop a écrit :
Hello,> I am hoping someone can help with this. I am running a query which selects all
> members of staff. This is then output to a form with checkboxes assigned with a
> delimiter and the staff id as the name of the checkbox (ie - MOD_#staff_id#).
>
> I want to be able to select ONLY ONE checkbox from the entire form (there are
> only about 10 records in the table) and RESTRICT ALL OTHERS from being selected
> once a checkbox has been marked off. In other words, once you select a checkbox
> you should not be able to select anything else unless you clear the one you
> previously selected, or ideally if you select more than one it automatically
> clears the previously selected box.
>
> Any help will be appreciated.
>
Maybe you can use radio against chekbox ?
Else you can do that with javascript...
Sorry for my bad english
JB
Jibé Guest
-
mxstu #3
Re: Limiting Number of Checkboxes
I agree with JB's suggestion. If you only want the user to be able to make one
selection, use radio buttons. Just make sure to give all of the buttons the
same name.
<form ...(your form settings)...>
<!--- radio button example: user will only be allowed to select one option
--->
<input type="radio" name="member_id" value="1" checked> Staff Member 1<br>
<input type="radio" name="member_id" value="2"> Staff Member 2<br>
<input type="radio" name="member_id" value="3"> Staff Member 3<br>
<input type="radio" name="member_id" value="4"> Staff Member 4<br>
<input type="radio" name="member_id" value="5"> Staff Member 5<br>
<input type="radio" name="member_id" value="6"> Staff Member 6<br>
<input type="radio" name="member_id" value="7"> Staff Member 7<br>
<input type="radio" name="member_id" value="8"> Staff Member 8<br>
<input type="radio" name="member_id" value="9"> Staff Member 9<br>
<input type="radio" name="member_id" value="10"> Staff Member 10<br>
</form>
mxstu Guest



Reply With Quote

