Jump to content

Disable a checkbox when another one is checked


Eiolon

Recommended Posts

Hi all.  I am wanting to disable a check box when another one is checked.

 

Here is a screenshot of what I am trying to do.

 

checkbox.jpg

 

Basically, if the registration fee box is checked I want the online registration box to be disabled (because participants can't pay online from the website).

 

Thanks!

So I take it this cannot be done with PHP?

 

I was reading on a solution using Javascript but it appears it only works in IE.

 

PHP is server-side. Meaning it does not know anything that goes on after the data is displayed without a POST BACK to PHP.

 

Javascript and html is Client-side, which means that they can interpret stuff when a user clicks on something without a POST BACK.

This is not PHP but,

 


<form>
<input type="radio" name="option" value="0"> A registration fee is required for this program.
<br />
<input type="radio" name="option" value="1"> Ask for participants age when registering for this program.
<br />
<input type="submit" name="submit" value="Submit">
</form> 

 

Then you just add the additional options to the form as needed.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.