Skip to main content
Participant
March 15, 2023
Question

Call example.com with a text filed

  • March 15, 2023
  • 1 reply
  • 566 views

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.]

 

 

This topic has been closed for replies.

1 reply

Nesa Nurani
Community Expert
Community Expert
March 15, 2023

Try this:

var str = this.getField("Text9").valueAsString;
var aLink = str.replace(/ /g, "-");
app.launchURL("https://example.com/"+aLink);