shx-3d-render
parent
ef114353a8
commit
3d2da90392
|
@ -306,6 +306,19 @@
|
|||
<label class="form__label custom shx-ifc-form_label" for="${inputID}-label">${labelText}</label>
|
||||
<div class="field custom">
|
||||
<input class="field__input" form="product-form-${section_id}" type="text" id="${inputID}" name="properties[${inputName}]" value="${inputVal}" oninput="document.querySelector('shx-input-forms').renderView()" required maxlength="20">
|
||||
<script>
|
||||
document.querySelector('#${inputID}').addEventListener('input',(e)=>{
|
||||
if(!document.querySelector('label[for="${inputID}-label"] span')){
|
||||
const span = document.createElement("span");
|
||||
span.style.marginLeft = '10px'
|
||||
document.querySelector('label[for="${inputID}-label"]').appendChild(span)
|
||||
}
|
||||
document.querySelector('label[for="${inputID}-label"] span').style.display = 'inline'
|
||||
document.querySelector('label[for="${inputID}-label"] span').textContent = e.target.value.length + ' | ' + 13
|
||||
if(e.target.value.length==0){
|
||||
document.querySelector('label[for="${inputID}-label"] span').style.display = 'none'
|
||||
}})
|
||||
</script>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue