I have a checkbox for creating a user
<input type="checkbox" id="chkCreateNewUser" name="chkCreateNewUser"/><label for="chkCreateNewUser">Create New User</label>
then i have this jquery
$("Input").click(function(){
if($('#chkCreateNewUser').attr('checked')){
$('#Firstname').val("");
}
when i type in the textbox and click the next textbox, the value i typed disappears. how do i make it when if the value of the textbox is not empty, the value typed stays?
I tried assigning it to avariable and displaying that variable but it just shows “[Object, Object]”. I know theres a simple solution thanks
why not disable the form when the element is unchecked. Just a suggestion.
Alsom, make sure your checkbox is not inside that form, otherwise it will get disabled too