Copy link to clipboard
Copied
On my form I have Text9 where a person enters an address like: 2950 E Sherr Ct
I want to have a button that calls a javascript that does the following
1. Convert 2950 E Sherr Ct to the format 2950-E-Sherr-Ct
2. call https://example.com/2950-E-Sherr-Ct
done
I appreciate the help
[moderator modified link to remove the actual company site. This could be considered as spam.]
Copy link to clipboard
Copied
Try this:
var str = this.getField("Text9").valueAsString;
var aLink = str.replace(/ /g, "-");
app.launchURL("https://example.com/"+aLink);