Concatenate two Action Fields?

Hi All,

Diving into plugin building and trying to learn (bear with me),

Is there a way to concatenate two action fields together? Is there a better way to do this? Basically all I’m trying to do is build a URL for the user. In this case, a Stripe Express URL.

I’d like for the user to be able to enter optional dynamic data to where they’re pointing to.

For example, I have an action ‘Connect to Stripe’ which looks as follows:

This is working perfectly to open in a new browser tab with the specified default URL. Is there a way to add a parameter to the end of this dynamically?

Such URL would be constructed like this and append the dynamic ‘email’ to the end of this:

https://connect.stripe.com/express/oauth/authorize?redirect_uri=https://bubble.io/poststripeauth&client_id=ca_1312309873485akjdflaskjdf&state={STATE_VALUE}&stripe_user[email]=

Any help is appreciated! :slight_smile:

You concatenate strings with + or string.concat() method.

The best way to learn this stuff is to get your Google-fu on:

https://www.google.com/search?q=javascript+concatenate+string&ie=UTF-8&oe=UTF-8&hl=en-us&client=safari

Pro tip: MDN is the official documentation for how JS works in the browser. (Well, the closest thing to that.)

Note that JavaScript’s type coercion is something that can potentially mess you up, but you’ll get used to that.

Also, note that there are various browser methods for helping you construct URLs, like:

Awesome, much appreciated @keith. :slight_smile:

This did the trick. I’ll read up on this more

1 Like