Great Ideas. Always Flowing.

We are not happy until you are happy. Client satisfaction guaranteed. Whatever your needs and requirements, we have the skills and resources for the job!

Quick login...


Or... now make it easy with Facebook Integration
Connect via Facebook



Top Sellers

Frustrated over the lack of customization for your user's registration fields? Dynamically setup your DNN Portal with custom registration fields, layout, questions, and other core integration options......

Ultra Video Gallery is a brother product of Ultra Media Gallery, UVG allows you to upload videos in various format and automatically encode them to flv or H264 format, you also can add videos from internet or record live videos from your webcam.

Build high performance, completely customizable data-entry forms and views driven by your DNN and external databases. New built-in tools make it a snap to quickly create data entry forms, data views, and even database tables. Plus, add your own HTML, CSS, Javascript, SQL commands, stored procedures,

The most advanced DotNetNuke shopping cart on the planet. Easy to use e-Commerce, Secure Shopping Cart Software and SEO friendly. B2C / B2B Ecommerce Sites.

One stop solution for events calendar and events registration! FREE DOWNLOAD is available now!

Max characters in Multiline Textbox
Last Post 06-18-2012 07:52 AM by Chad Nash. 10 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Mark HarleUser is Offline
going with the flow
going with the flow
Posts:45
Avatar

--
05-30-2012 06:50 AM
    Hi - I want to limit the number of characters that can be added to a textbox (DynamicForms v 4.1).  But I cannot find this option in the Admin pages - and cannot find an answer on the forum.
    Can anyone help?
    Thanks in advance.
    Mark
    Chad NashUser is Offline
    Posts:5260
    Avatar

    --
    05-30-2012 06:56 AM
    Hi Mark - Please review demonstration #7 at http://www.datasprings.com/formdemos.

    Thanks,

    Chad
    msjswissUser is Offline
    wading in the water
    wading in the water
    Posts:22
    Avatar

    --
    05-30-2012 09:37 AM
    I have this set up on one of my forms, but it still allows the user the submit even if they exceed the character limit. Is there a regular expression validator that would work along with Demo #7?
    Chad NashUser is Offline
    Posts:5260
    Avatar

    --
    05-30-2012 04:29 PM
    Hi. I think maybe we modified the JAvaScript for our demo to actually stop the user from being able to add more characters? So we might need to update the default JavaScript file within the module... You would also have the option to use SQL Validation as well which is something to consider.

    -Chad
    msjswissUser is Offline
    wading in the water
    wading in the water
    Posts:22
    Avatar

    --
    05-31-2012 04:15 AM
    When I tested it yesterday it allowed me to enter more than the limit, so the update would be super helpful. I like the idea of using the SQL validation though too...would I use the same Javascript used in the stylesheet?
    Chad NashUser is Offline
    Posts:5260
    Avatar

    --
    05-31-2012 06:57 AM
    Hi - I checked our demonstration again here:
    http://www.datasprings.com/products...stration-6

    It does appear that we fixed this within the JavaScript function. So what you would need to do is copy the function from within this file:

    http://www.datasprings.com/Portals/...ule_873.js

    The very first function here is "CountChars" and you will need to replace your function under Module Configuration, Advanced Option, Custom JavaScript File.

    I am not sure I can post this in the forum directly but here is the function itself:

    function countChars(dId,txtVal,txtControl, limit)
    {
    var totalLen = txtVal.length + 1;

    if (totalLen < limit)
    {
    document.getElementById(dId).innerHTML = "You have used " + totalLen + " of " + limit + " characters available.
    You have " + (limit - totalLen) + " characters remaining.
    ";
    }
    else
    {
    document.getElementById(dId).innerHTML = "You have exceeded the character limit for this field.";
    document.getElementById(txtControl).value = txtVal.substring(0,limit + 2)

    }
    }

    msjswissUser is Offline
    wading in the water
    wading in the water
    Posts:22
    Avatar

    --
    05-31-2012 07:38 AM
    This is what I originally had:

    function countChars(dId,txtVal,limit)
    {
    var totalLen = txtVal.length;

    if (totalLen < limit)
    {
    document.getElementById(dId).innerHTML = "You have " + (limit - totalLen) + " characters remaining.";
    }
    else
    {
    document.getElementById(dId).innerHTML = "You have exceeded the character limit for this field.";
    }
    }
    -------------

    I copied what you had below (my computer wouldn't let me open the file link), hit the update button, then update settings, and then F5 to refresh and now when I place the cursor in the field and begin to type it immediately tells me I've exceeded the character limit.

    What happened? I've gone back and double checked everything, plus the Div message is fine.

    msjswissUser is Offline
    wading in the water
    wading in the water
    Posts:22
    Avatar

    --
    05-31-2012 07:39 AM
    Oops...meant to say I copied what you entered 'above'...not below. I was thinking your text would appear below my reply.
    msjswissUser is Offline
    wading in the water
    wading in the water
    Posts:22
    Avatar

    --
    06-04-2012 07:51 AM
    Haven't heard back from anyone on this...any ideas on what to change in the Javascript to make this work? It works in your demo, but when I use it in our form it still allows you to go over the max character limit.
    robax robaxUser is Offline
    river guide
    river guide
    Posts:101
    Avatar

    --
    06-18-2012 02:54 AM
    The script in the demo is only for counting characters.
    As far as I'm aware it's not possible to do this in any case for multi-line fields, but if someone ever manages to do it, let us know.
    Regards
    Rob
    Chad NashUser is Offline
    Posts:5260
    Avatar

    --
    06-18-2012 07:52 AM
    Hi Guys... I actually sent this over (JavaScript file we had updated from that demo) which does actually stop the characters from continuing. Without using the updated JavaScript file/function though you are right, there is no way do set a MaxLength property in HTML for a multiline field type.

    Thanks,

    Chad
    You are not authorized to post a reply.


     
     

    Join our mailing list...

    Get current news and events the easy way
    Subscribe Me

    Recent Blogs...

     
    Copyright 2005 - 2011 by Data Springs, Inc.
     
  • film izle
  • 720 izle
  • film
  • sinema izle
  • film makinesi
  • T�rk�e dublaj film
  • film izle
  • film izle
  • baglan film izle
  • sinema izle
  • 1080 film izle
  • film mercegi