Workflow Soluiton

 View Only
  • 1.  Want to display remaining number of characters for a text box in a label

    Posted Jun 24, 2009 10:41 AM
    I have a text box that is limited to 500 characters.  I was to actively display the number of remianing characters that the user has left before the 500 character threshold is exceeded.  At this point, I also want the user to no longer be able to enter additional characters.  Is there a way to do this with ajax?  I will probably have to do a re-write for all of the content in the text box each time a new character is entered or removed.  Not sure how to go about doing this though.

    Thanks in advance...


  • 2.  RE: Want to display remaining number of characters for a text box in a label

    Posted Jun 24, 2009 11:13 AM
    You can use the on text change event to check the number of characters.  If the number of characters is > 500 reset the text box to the first 500 characters.  You can also display a message saying the user has reached the limit.   There also might be a maximum property on the textbox that you can set to not allow the user to enter more than 500 characters.


  • 3.  RE: Want to display remaining number of characters for a text box in a label

    Posted Jun 24, 2009 11:41 AM
    Oh, I guess I missed the main point.  

    To display the characters left, on text change display 500 - "number of characters in text box".


  • 4.  RE: Want to display remaining number of characters for a text box in a label

    Posted Jun 24, 2009 01:22 PM
    I'm assuming this event is to be defined in the label, not the text box.  There is no ontextchange event to select from the list.  It goes from onselectstart to ontimeerror.  Also, how do I tell it which text box to look at for the event?

    Any clarfication would be really helpful...

    Thanks!


  • 5.  RE: Want to display remaining number of characters for a text box in a label

    Posted Jun 24, 2009 01:54 PM
     Where are you actually trying to do this? 


  • 6.  RE: Want to display remaining number of characters for a text box in a label

    Posted Jun 24, 2009 02:03 PM
    Inside of a Form Builder component.


  • 7.  RE: Want to display remaining number of characters for a text box in a label

    Posted Jun 24, 2009 02:21 PM
    Well,

    If are there any events listed for the text box that are similar to on text change?  I read and replied to this discussion as though you were doing this in a webpage.  I am not to familiar with the form builder.  I reckon there has to be some sort of event that detects the user editing the text box.  If there is than you should also be able to pull a length property from the textbox or use a length function on the text in the textbox to determine if the user has gone over the 500 character limit.