Skip to content
This repository has been archived by the owner on May 16, 2021. It is now read-only.

Form reset doesn't affect checkboxes, radios, selects - but only inputs. #348

Closed
pratiksha2211 opened this issue Jul 18, 2013 · 2 comments
Closed
Assignees

Comments

@pratiksha2211
Copy link

Uniform reset does not allow to reset checkbox on form reset button ..

Thanks

@jxpx777
Copy link

jxpx777 commented Aug 6, 2013

Sounds similar to #349

@shehi shehi changed the title Checkbox not reset automatically on Form Reset button Form reset doesn't affect checkboxes, radios, selects - but only inputs. Aug 24, 2016
@shehi shehi added this to the 4.0 - Legacy Final milestone Aug 24, 2016
@shehi shehi self-assigned this Aug 24, 2016
@shehi
Copy link
Member

shehi commented Aug 26, 2016

Uniform generally doesn't handle any form mechanisms, including "Reset" buttons, but rather provides options to help with their handling.

For proper Reset button handling you could update() them:

$("input[type='reset']").click(function(e) {
    setTimeout(function () {
        $uniformed.uniform.update();
    }, 1);
});

setTimeout() function here is required for a potential race-condition: Uniform needs to wait at least a millisecond for native reset event kick in and finish, so that it could update() with reset values.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants