frontello-ui-field
v1.1.7
Published
UI field
Downloads
4
Readme
Field
Form exemple :
<form action="" method="">
<div class="field">
<label class="label">Text</label>
<div class="value">
<input type="text" name="text" value="Lorem ipsum dolor sit amet, consectetur adipisicing elit.">
</div>
</div>
</form>
Check
<script>
document.addEventListener('DOMContentLoaded', function () {
let isCompliant = FieldCheck.checkFieldsCompliance(document.querySelectorAll('form .field'));
});
</script>
Placeholder
<script>
document.addEventListener('DOMContentLoaded', function () {
FieldPlaceholder.initFields(document.querySelectorAll('form .field'));
});
</script>
Value
<script>
document.addEventListener('DOMContentLoaded', function () {
let value = FieldValue.get(document.querySelector('form [name="text"]'));
});
</script>