I am not at all experienced with Javascript, so I don’t really know what I am doing.
Here is the description of what I am trying to do:
I have a form with 2 fields (field1 and field2). The user will enter a value into field1 (i.e. Jim’s Stuff). I now want to transform this text, by making it all lower case, changing the spaces to dashes, and to remove many special characters, such as brackets, periods and apostrophes. The remaining result I then want to be displayed in field2, provided that field2 is blank (i.e. jims-stuff)
With a bit of help from someone else, I here is the code I currently have to work with. The problem though, is since I don’t know what I am doing, I don’t know how to change the value from field1 (an HTML element) to a javascript string, that I can then do my transformation/replacements, and them convert back to an HTML element.
Could someone please help me with this: