Skip to main content
Nintex Community Menu Bar

Checking Hyperlink for spaces and delete them, javasript

  • February 17, 2020
  • 4 replies
  • 9 views

Forum|alt.badge.img+1

Hello,
i have a column in a sharepoint list where users can enter a hyperlink using Nintex Forms.

Unfortunately, it has happened now and then that a space slips into the link by mistake.

Can I use a Javascript function to check the column for spaces and delete them all automatically ?

 

i have already created the client ID as a java script variable under the name link control but i don't know how i have to build my function to delete the spaces and get the result.

 

Thank you very much for an answer

 

4 replies

Simon Muntz
Nintex Partner
Forum|alt.badge.img+23
  • Nintex Partner
  • February 18, 2020
Hi,

Just a suggestion.
Instead of going back and fixing spaces how about use regular expression validation to tell the user that their input is not in the correct format.

Forum|alt.badge.img+1
  • Author
  • February 19, 2020

yes but in Nintex Hyperlink Control Settings i have no field for regular expression like in a normal text field6505iE0CF6DD5B4CD0657.png


Simon Muntz
Nintex Partner
Forum|alt.badge.img+23
  • Nintex Partner
  • February 19, 2020
The custom validation allows you to enter a Javascript function to call. You could create a javascript function that uses a regular expression to do the validation.

Forum|alt.badge.img+1
  • Author
  • February 20, 2020

I have written these Funktion but it doesn´t work.

 

Can you help me?

6526iAFD3CDD4E5FE0115.png6527i2631F395EDA37ADD.png