marcusm Posted September 27, 2011 Share Posted September 27, 2011 I need a rule that formats an e-mail from: input: peter.jonsson@company.com output: peter.jonsson @company.com I want a break (<br> before the @ so the textbox doesnt add "-" if the e-mail is too long. How can fix this with a rule? Im not a star on JavaScript so be nice Link to comment Share on other sites More sharing options...
esmith Posted September 27, 2011 Share Posted September 27, 2011 return Field("EMAIL").replace("@", "<br>@"); This will always add a break to your email address. If you only want to break the address when necessary, you will need to use the TextMeasure method which is a tad more complicated. Link to comment Share on other sites More sharing options...
marcusm Posted September 27, 2011 Author Share Posted September 27, 2011 This worked perfectly , Thanks for the solution! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.