Select all other fields in a form
<p>I am looking for how I can disable all other inputs on a form when a checkbox is selected. I have it halfway there now, but when my problem is when i click the checkbox, it disables itself along with the other elements. i want only the other elements to become disabled.</p>

<p><a href="http://jsfiddle.net/rockitdev/8TF2a/3/" rel="nofollow">http://jsfiddle.net/rockitdev/8TF2a/3/</a></p>

<pre><code>    &lt;form action="#" method="post"&gt;

&lt;div&gt;
    &lt;label for="checkbox"&gt;Checkbox:&lt;/label&gt;
    &lt;input type="checkbox" name="checkbox" id="checkbox" /&gt;
&lt;/div&gt;

&lt;div&gt;
     &lt;label for="name"&gt;Text Input:&lt;/label&gt;
     &lt;input type="text" name="name" id="name" value="" tabindex="1" /&gt;
&lt;/div&gt;

&lt;div&gt;
     &lt;h4&gt;Radio Button Choice&lt;/h4&gt;

     &lt;label for="radio-choice-1"&gt;Choice 1&lt;/label&gt;
     &lt;input type="radio" name="radio-choice-1" id="radio-choice-1" tabindex="2" value="choice-1" /&gt;

     &lt;label for="radio-choice-2"&gt;Choice 2&lt;/label&gt;
     &lt;input type="radio" name="radio-choice-2" id="radio-choice-2" tabindex="3" value="choice-2" /&gt;
&lt;/div&gt;

&lt;div&gt;
    &lt;label for="select-choice"&gt;Select Dropdown Choice:&lt;/label&gt;
    &lt;select name="select-choice" id="select-choice"&gt;
        &lt;option value="Choice 1"&gt;Choice 1&lt;/option&gt;
        &lt;option value="Choice 2"&gt;Choice 2&lt;/option&gt;
        &lt;option value="Choice 3"&gt;Choice 3&lt;/option&gt;
    &lt;/select&gt;
&lt;/div&gt;

&lt;div&gt;
    &lt;label for="textarea"&gt;Textarea:&lt;/label&gt;
    &lt;textarea cols="40" rows="8" name="textarea" id="textarea"&gt;&lt;/textarea&gt;
&lt;/div&gt;



&lt;div&gt;
    &lt;input type="submit" value="Submit" /&gt;
&lt;/div&gt;
</code></pre>

<p></p>

<pre><code>$('#checkbox').click(function () {
    var $this = $(this);
    // $this will contain a reference to the checkbox   
    if ($this.is(':checked')) {
        $('input:not(this)').attr("disabled", true);
    } else {

    }
});
</code></pre>
