SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Guru
    Join Date
    Nov 2004
    Location
    calif
    Posts
    743
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Limit Description text area characters

    In this php script Video Upload Form, how can I limit the number of characters that can be entered into the description text area?

    Thanks

    Code:
    <!--Begin Left Column-->
        <div id="column-left-2">
        <!--Begin Upload Menu-->
          <div class="header-narrow"><h3>[var.lang_main_menu]</h3></div>
          <div class="whats-showing">
            <ul>
              <li><a href="uploader.php">[var.lang_upload_video]</a></li>
                  <!--[var.audio_inner_upload_video_form1;htmlconv=no;comm]-->
    	      <li><a href="image_uploader.php">[var.lang_upload_image]</a><!--[onload;block=li;when [var.enable_images]=1;comm]--></li>
            </ul>
          </div>
         <div class="container-narrow-bottom"></div><!--End Upload Menu-->
    
       <!--Begin Left Advert-->
          <div class="container-narrow-top"></div>
            <div id="advert-left">
              <!--[var.ads_left;htmlconv=no;comm]-->
            </div>
          <div class="container-narrow-bottom"></div><!--End Left Advert-->
    
        </div><!--End Left Column-->
    
      <!--Begin Right Column-->
        <div id="column-right-2">
    
          <div class="header-wide"><h2>[var.lang_upload_video]</h2></div>
            <div class="container-wide">
              <!--BEGIN - Addon Video Grabber Code can be added in this div-->
              <div>
    
              </div>
              <!--END - Addon Video Grabber Code can be added in this div-->
    
              <!--Begin Upload Video Form-->
              <form name="form_upload" action="uploader.php" method="post">
                <div id="upload-video">
                  <ul>
                    <li style="width:240px; text-align:right;"><strong>[var.lang_title]:</strong></li>
                    <li style="width:400px; text-align:left;"><input name="title" type="text" class="upload-video-form-input" value="[var.title]" size="38" />
                    </li>
    
                    <li style="width:240px; text-align:right;"><strong>[var.lang_description]:</strong></li>
                    <li style="width:400px; text-align:left;"><textarea rows="4" name="description" cols="29" class="upload-video-form-input">[var.description]</textarea>
                    </li>
    
                    <li style="width:240px; text-align:right;"><strong>[var.lang_tags]:</strong></li>
                    <li style="width:400px; text-align:left;"><input name="tags" type="text" class="upload-video-form-input" value="[var.tags]" size="38" />
                    </li>
    
                    <li style="width:240px; text-align:right;">&nbsp;</li>
                    <li style="width:300px; text-align:left;" class="upload-video-tags">
                    [var.lang_enter_tags].<br />
                          [var.lang_enter_tags_description].</li>
    
                    <li style="width:240px; text-align:right;"><strong></strong></li>
                    <li style="width:400px; text-align:left;">
                    <input type="hidden" name="channel" value="SINGLECHANNEL"></li>
    
                   
               	    <li style="width:240px; text-align:right;"><strong></strong></li>
    				<li style="width:400px; text-align:left;">
                    <input type="hidden" name="public_private" value="public"></li>
    
               	    <li style="width:240px; text-align:right">&nbsp;</li>
               	    <li style="width:400px; text-align:left;">
               	      <input class="button-form" type="submit" value="Next &gt;&gt;" name="B3" />
               	    </li>
               	  </ul>
                </div>
                <input class="upload-video-form-input" type="hidden" name="form_submitted" value="yes" />
              </form>
              <div class="clear-fix"></div>
            </div>
          <div class="container-wide-footer"></div>
    
        </div><!--End Right Column-->

  2. #2
    SitePoint Enthusiast
    Join Date
    Jul 2009
    Location
    Austria
    Posts
    43
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    how can I limit the number of characters that can be entered into the description text area
    It&#180;s not possible with html.

    But you can count characters with JavaScript. And if limit is exceeded you can ignore further inputs. But this is only possible, if JavaScript is enabled!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •