<script> document.addEventListener("DOMContentLoaded", () => { const formNIP = document.querySelectorAll('input[name=form-field-akxdvc]')[0]; const formPostcode = document.querySelectorAll('input[name=form-field-vkfutb]')[0]; if (formNIP && formPostcode) { console.log(formPostcode); console.log(formNIP); formNIP.setAttribute("pattern", "[0-9]{10}"); formNIP.setAttribute("title", "Numer NIP musi mieć 10 cyfr"); formPostcode.setAttribute("pattern", "[0-9]{2}-[0-9]{3}"); formPostcode.setAttribute("title", "Niepoprawny format kodu pocztowego"); } }) </script>