shx-3d-render
parent
dee77b792b
commit
732d9786e1
|
@ -310,16 +310,18 @@
|
|||
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 + ' von ' + 32 + ' Zeichen';
|
||||
document.querySelector(`label[for="${inputID}-label"] span`).style.color = undefined;
|
||||
document.querySelector(`label[for="${inputID}-label"] span`).textContent = e.target.value.length + ' von ' + 24 + ' Zeichen verwendet';
|
||||
if(e.target.value.length==0){
|
||||
document.querySelector(`label[for="${inputID}-label"] span`).style.display = 'none'
|
||||
document.querySelector(`label[for="${inputID}-label"] span`).textContent = 'Bitte gib deinen Text ein';
|
||||
document.querySelector(`label[for="${inputID}-label"] span`).style.color = 'red';
|
||||
}});
|
||||
}, 1000);
|
||||
|
||||
return `
|
||||
<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="32">
|
||||
<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="24">
|
||||
|
||||
</div>
|
||||
`;
|
||||
|
|
Loading…
Reference in New Issue