The Schworak Site | Log In | Up One Level
Web Components > checkbox
This checkbox can be used in place of a standard checkbox in a form.
Usage: <schworak-checkbox name='checkbox_name' value='1'>label_text_here</schworak-checkbox>Attributes:
- name, the field name to be passed when the form is submitted.
- checked-img, the image to use when the checkbox is checked.
- unchecked-img, the image to use when the checkbox is unchecked.
- value, the value to pass when the form is submitted and the checkbox is checked.
- checked, property flag to initialize the item as checked when first loaded.
- readonly, when this flag is set, the value cannot be changed but it will be passed though when the form is submitted.
- disabled, when this flag is set, the value cannot be changed and WILL NOT be passed though when the form is submitted.
- The label portion of the checkbox is set by adding your text between the open/close tags
- click, fires when the user clicks the element or if code trys to change the check state as long as it is not disabled or readonly.
- change, fires when the check state is toggled.
All content on this site is copyright ©2004-2021 and is not to be reproduced without prior permission.