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 Quote 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. Quote 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! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.