comeet
Canvas Initiate

Checking Hyperlink for spaces and delete them, javasript

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

 

0 Kudos
Reply
4 Replies
SimonMuntz
Nintex Employee
Nintex Employee

Re: Checking Hyperlink for spaces and delete them, javasript

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.
0 Kudos
Reply
comeet
Canvas Initiate

Re: Checking Hyperlink for spaces and delete them, javasript

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

0 Kudos
Reply
SimonMuntz
Nintex Employee
Nintex Employee

Re: Checking Hyperlink for spaces and delete them, javasript

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.
0 Kudos
Reply
comeet
Canvas Initiate

Re: Checking Hyperlink for spaces and delete them, javasript

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

 

Can you help me?

2020-02-20 10_39_36-Nintex Forms Designer - LinkedIn Post - Item - Internet Explorer.png2020-02-20 10_38_57-Nintex Forms Designer - LinkedIn Post - Item - Internet Explorer.png

 

 

0 Kudos
Reply