(Squarespace) Change (required) to *

To change (required) to * in Form Block, you can use this code to Website Tools > Code Injection > Footer.

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script>
  window.addEventListener("load", (event) => {
    $("span.description.required").html(function() { 
          return $(this).html().replace("(required)", "*");  
    });
});
</script>
<style>
  span.description.required {
    color: red !important;
    opacity: 1 !important;
}
</style>
2 Likes