Web Development

  Homes arrow Web Development arrow Hidden form values
 Webmaster Tools
 
Base64 Encoding 
Browser Settings 
CSS Coder 
CSS Navigation Menu 
Datetime Converter 
DHTML Tooltip 
Dig Utility 
DNS Utility 
Dropdown Menu 
Fetch Content 
Fetch Header 
Floating Layer 
htaccess Generator 
HTML to PHP 
HTML Encoder 
HTML Entities 
IP Convert 
Meta Tags 
Password Encryption
 
Password Strength
 
Pattern Extractor 
Ping Utility 
Pop-Up Window 
Regex Extractor 
Regex Match 
Scrollbar Color 
Source Viewer 
Syntax Highlighting 
URL Encoding 
Web Safe Colors 
Forums Sitemap 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
WEB DEVELOPMENT

Hidden form values
By: Developer Shed
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating:  stars stars stars stars stars / 0
    2004-05-21

    Table of Contents:

    Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     

    SEARCH DEV MECHANIC

    TOOLS YOU CAN USE

    advertisement


    by: Codefixer.com

    Hidden form values

    Below highlighted in red is what the HTML for a hidden form value looks like. As you can see it's almost the same as the HTML form textbox below it. The major difference is that the hidden form value isn't visible to the user.

    <input type="hidden" name="hasdonelogin" value="true">
    <input type="text" name="textfield" value="">

    Using a hidden form value comes in handy for such things as logins, where you have a username and password textbox. If the forms action is to send its values to the same page (ie self referencing) then by using a hidden form value you can monitor whether the user has clicked on the submit button and thus filled in the form.
    If it is the first time a user has accessed your page, hasdonelogin will have no value, it will be empty. If they have just submitted your form, hasdonelogin will have a value of true, and in that scenario you don't need to show the login form again with the username and password textfields.

    <%
    ' if the hasdonelogin form value equals nothing the form has not been submitted
    If Request.Form("hasdonelogin")="" Then
    'make sure the username and password textboxes are displayed
    %>
    <form name="form1" method="post" action="">
    <input type="hidden" name="hasdonelogin" value="true">
    <input type="text" name="username" value=""><br>
    <input type="text" name="password" value=""><br>
    <input name="submit" type="submit" value="submit">
    </form>
    <%
    Else 'run this code if hasdonelogin has a value true
    'don't show the username and password textboxes
    response.write "You clicked on the form and the hidden value has been sent"
    End If

    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

    More Web Development Articles
    More By Developer Shed

       

    WEB DEVELOPMENT ARTICLES

    - On Page SEO for New Domains
    - Improve Your Site`s Speed
    - Safari Books Online Review
    - Creating an Estore From the Ground Up
    - Most Common SEO Mistakes Developers Make
    - Making the Most of Your Titles and Meta Desc...
    - Five Ways Using Flash Can Damage Your Site
    - A Web Designer`s Guide to Colors
    - Use Webstarts to Create a Free Site
    - More Than Just Looks. How Your Web Design C...
    - How to Design Content Pages
    - Mint Review
    - Make Your WordPress Website Look Professional
    - How to Create a Mobile Web Site
    - Meta Tags: Still Useful?

    Developer Shed Affiliates

     



    © 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap