• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Call example.com with a text filed

New Here ,
Mar 14, 2023 Mar 14, 2023

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

 

 

TOPICS
JavaScript , PDF forms

Views

414

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 14, 2023 Mar 14, 2023

Copy link to clipboard

Copied

LATEST

Try this:

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines