CosminV of Technical Support
11/14/2019 - 11:51 AM

Change field type to password (if it doesn't have the label password)

Change field type to password (if it doesn't have the label password)

Example: http://changefieldtopw.pagedemo.co/

<!-- START code - change field type to password -->
<script>
document.addEventListener("DOMContentLoaded", function() {
    var fieldName = 'Dog name';
    var fieldLabel =  window.__page_generator ? fieldName : base64_encode(fieldName); 
    document.querySelector('[name="' + fieldLabel + '"]').type = 'password';
    });
</script>
<!-- END code - change field type to password -->
<!-- START code - change field type to password -->
<script>
document.addEventListener("DOMContentLoaded", function() {
    var fieldName = 'Dog name';
    document.querySelector('[name="' + fieldName + '"]').type = 'password';
    });
</script>
<!-- END code - change field type to password -->