Jump to content

change text color


Recommended Posts



Sorry for my English, I'm french.


I'm in trouble with my javascript code for a rule.

I try to change the color of my text but fusion pro doesn't interprate the code, it just translate into html.


var s = Field("tel");
s = s.replace(/\D/g,""); 
if (s.length == 10) { return "" + "" +Left(s,1) + "" + s.substring(1,2) +" " + s.substring(2,2)+ "" + s.substring(4,2) +" "+ s.substring(6,4) +" "+ s.substring(8,6) + " " +Right(s,2); }
else { 
return '<color name="red">' + string1 + "</color>"; 

I just want to write a message if the phone number is not correct (10 numbers in my country), but FB write « <color name="red">!!!! NUMERO DE TELEPHONE NON CONFORME !!!!</color> »


Can someone help me ?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...