I have a hidden input field that will take the value of another on keyup and I'm trying to figure out how transform the value in the hidden field to lowercase and replace spaces with hyphens. So, if someone types "This Is A Sample" in the title input field, the identifier input field will be set to "this-is-a-sample".
<input type="text" name="title" value="This Is A Sample" />
<input type="hidden" name="identifier" value="this-is-a-sample />