Require specific text in form field

Hi everyone -

I’ve tried checking out the forums, but I am not seeing an easy solution to my issue. Hoping something new has popped up recently.

I am running a Webflow to Memberstack to Airtable back to Webflow circle. Data appearing appropriately is key.

Despite my best efforts in trying to textually tell people to only use websites with http:// or https:// in the form, they are putting all manner of links. Many don’t transfer across the services. Especially if they copy the hyperlink from a word and not from say the URL itself. Zapier ends up kicking back an error because it’s expecting a website not a word.

Any ideas how I can easily require http:// or https:// in the various form fields to help alleviate this problem? Here you can see a shot of the website and 3 of several available places to add webpages.

I should probably preface I’m using no-code tools because I’m a no-code fool. Any help in demystifying the processes would be amazing.


Here is my site Read-Only: [LINK]

Hey! It looks like HTML has an input type of URL (HTML input type="url") this might be something worth checking out. You could always do a code embed with this input type and just add the class of your other form fields to it

1 Like

check that link plz

Use the pattern attribute.

Select your INPUT element in the designer, and add a custom attribute named pattern
Give it a value of https:\/\/.*

If the designer allows it, add a custom title attribute as well, with a value of;
Enter a secure https: URL

And if you want to be really complete, change the INPUT field’s type attribute to url;
However you’d likely have to do that with script.

Pen

1 Like

Whoops, just reread this, I read too quckly on my first glance and though you were trying to require https: links.

To allow both, change;

pattern = (https?:\/\/.*)

That questionmark makes the s optional.

1 Like

@memetican, you are awesome! That seems to have solved my issue. I was able to set it up through the custom attributes alone. Perfect answer for a non-coder like myself. Thanks!

1 Like