Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @hoaboard

    You can use jQuery for this approach:

    <script type="text/javascript">
    function updateUsername(){
      first = document.getElementById("first_name-562").value.toLowerCase();
      last = document.getElementById("last_name-562").value.toLowerCase();
      document.getElementById("user_login-562").value = first+"-"+last;
    }
    
    jQuery("#first_name-562,#last_name-562").on("keyup",function(){
         updateUsername();
    });
    </script>

    Regards,

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hey there!

    This thread has been inactive for a while so we’re going to go ahead and mark it Resolved. …Please feel free to re-open this thread by changing the Topic Status to ‘Not Resolved’ if any other questions come up and we’d be happy to help. 🙂

    Regards,

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Add Attribute to Input ID’ is closed to new replies.