Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsRepositoryRepositoryLimiting length of description field in a template?Limiting length of description field in a template?
Previous
 
Next
New Post
8/3/2011 8:56 AM
 
the [DESCRIPTION] tag will inject a Text Editor control, and associate it with the Description field.  In the code you pasted, you want the ID of the control, but what you are doing is injecting a second control with the same name.

The thing that makes this particular issue so complicated is that what is injected is a DNN Text Editor which is a wrapper for whichever text editor you are using (Fck, Telerik, etc) as configured in the web.config.

The Telerik RadEditor control has a MaxTextLength property, but I don't believe the DNN Text Editor exposes that property. To further complicate things, if you view the source of a rendered form, you'll see that the text area where the user types is actually rendered within an iframe.

Not sure at this point how to accomplish what you want, but I will continue to look for a solution and let you know if I can figure out how to set a character limit on a DNN Text Editor control.
 
New Post
8/4/2011 3:05 AM
 
Many thanks Steve. I've been getting a crash course in jQuery, so it's an interesting quest. :-)
 
New Post
8/17/2011 6:07 AM
 

Thanks Steve for the iput, I discovered limiting the character is vital, as I am running a job listing and classified sections where users register and upload their postings. Meaning I simply cannot limit their content. Unless manually as a moderatorHaving content filers is great as many just copy and paste the description from  word, filters have solved this issue..

Had a look at telerik website for a solution and all discuss both the jquery and indeed it is so complicated  (especially for a non coder) a it as to be connected with the id as you ealier referred.
I also tried to limit the size of the text box but noi like as the scroll can not be disabled

I have miodule that was developed by my programmer some time ago. He used the asp textbox (plain text without the editor) and used the following code to limit text on the asp control. I am willing to give up the telerik  editor provided get a limit on the characters. Can this be done?

But ideally, a future enhancement for the next release  would be limiting the text from the xml file (similar to limiting the size of the file upload) as one can implement  it per instance and not per module.

Any thoughts?

<td>

<asp:TextBox ID="txtOrganizer" runat="server" CssClass="field_title" Height="290px"

MaxLength="1000" Style="overflow: auto;" TextMode="MultiLine"  Width="500px"></asp:TextBox>

</td>

<td align="left">

<asp:RequiredFieldValidator ID="rfvEndDate2" runat="server" ControlToValidate="txtOrganizer"

CssClass="notifiaction_style" Display="Dynamic">Please enter organizer info.</asp:RequiredFieldValidator>

<asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="txtOrganizer"

CssClass="notifiaction_style" Display="Dynamic" ErrorMessage="A max of 1000 characters is only allowed."

ValidationExpression="^(.|\r|\n){1,1000}$"></asp:RegularExpressionValidator>

</td>

 

</td>

<td align="left">

<asp:RequiredFieldValidator ID="rfvEndDate2" runat="server" ControlToValidate="txtOrganizer"

CssClass="notifiaction_style" Display="Dynamic">Please enter organizer info.</asp:RequiredFieldValidator>

<asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="txtOrganizer"

CssClass="notifiaction_style" Display="Dynamic" ErrorMessage="A max of 1000 characters is only allowed."

ValidationExpression="^(.|\r|\n){1,1000}$"></asp:RegularExpressionValidator>

</td>

 

 
New Post
12/5/2011 4:37 AM
 

I found a solution, easy and clean

1. Install  dnnWerk.RadEditorProvider, one can customize the toolbox and other features, per user role.

 2. Open the ConfigDocumented.xml  in the Telerik folder \Providers\HtmlEditorProviders\Telerik  with full reference  to all the additional options.

 3. Copy

<property name="MaxTextLength">xxxxx</property>

and paste it in the config file of the user group and portal number you have customized  it is here \DesktopModules\dnnWerk.RadEditorProvider\ConfigFil

In my case it is ConfigFile.Registered.PortalId.0.xml

     xxxx state the max length of the text (integer)

I tried it and it works, I get popup dialog box with the error  “1000 . . “  1000 is  the the value of the max length of the text one has selected.

I can not find a way to place my own error message saying "The max length permitted is 1000 characters, please go back and reduce the text length"”

From the Repository module, I know this is implemented by the resx file, but I need to place the reference in the resx file  of the editor and insert my custom error message.

Any suggestion here ?

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsRepositoryRepositoryLimiting length of description field in a template?Limiting length of description field in a template?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out