Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Feb 07, 2013 06:49 PM by Nasser Malik
Member
124 Points
185 Posts
Feb 07, 2013 04:19 PM|LINK
How to set maxlength for free text box.
and i dont the html tags to paste in ftb, i want in plain text how can I do that.
Star
11664 Points
1793 Posts
Feb 07, 2013 06:49 PM|LINK
Hi,
Take a look at FTB-FreeTextBox.js , line 384, you should see the following.
if (this.clientSideTextChanged)
this.clientSideTextChanged(this);
Add the following code after it and it should restrict your text box to only 500 characters.
var textsize = this.designEditor.document.body.innerHTML;
if ((textsize.length) > 499) { this.designEditor.document.body.innerHTML = textsize.substring(0,499); }
Hope this helps. I would recommend showing the user how many characters they have currently typed in.
See http://forums.freetextbox.com/default.aspx?g=posts&t=5213
sATsvelKe
Member
124 Points
185 Posts
maxlength and plain text mode for ftb
Feb 07, 2013 04:19 PM|LINK
How to set maxlength for free text box.
and i dont the html tags to paste in ftb, i want in plain text how can I do that.
Nasser Malik
Star
11664 Points
1793 Posts
Re: maxlength and plain text mode for ftb
Feb 07, 2013 06:49 PM|LINK
Hi,
Take a look at FTB-FreeTextBox.js , line 384, you should see the following.
if (this.clientSideTextChanged)
this.clientSideTextChanged(this);
Add the following code after it and it should restrict your text box to only 500 characters.
var textsize = this.designEditor.document.body.innerHTML;
if ((textsize.length) > 499)
{
this.designEditor.document.body.innerHTML = textsize.substring(0,499);
}
Hope this helps. I would recommend showing the user how many characters they have currently typed in.
See http://forums.freetextbox.com/default.aspx?g=posts&t=5213
Skype: maleknasser1