htmlInputHidden
Hidden input field control
[Previous] [Main] [Next]


Description
htmlInputHidden encapsulates the <INPUT TYPE="HIDDEN"></INPUT> tags. Hidden fields within forms are not displayed by browsers but are transmitted with other name/value pairs when the form is submitted to a server. Hidden fields are commonly used to embed control data, or to pass state information between pages.  
 
Note that though hidden fields are not displayed by browsers, they should not be considered secure unless explicitly encrypted. Hidden fields may be viewed by users if they view the HTML source of a page.  
 
The htmlCgi::AsHidden() method provides a convenient way to store CGI variables as hidden fields within a form. Hidden fields are often used to pass sensitive information (such as record ID's or credit card numbers) between pages. It is often useful to encrypt such information to prevent modification or viewing by users of the page. html++ can automatically encrypt hidden fields (and URL-encoded data).  
 
To enable automatic encryption and decryption, instantiate a Coder-derived object (such as ScrambleCoder) in the same area of your program as the htmlServer-derived (htmlCgi or htmlISAPI) instance, then pass a pointer to it to html++ using the htmlServer::Crypt() method.  
 
Declaration
#include <dcmicro/htmlpp/hidden.h>  
 
Hierarchy
htmlinputhidden.gif  
 
See Also
htmlForm, htmlServer, htmlCgi, htmlISAPI, htmlScrambleCoder  
 
Related Constants/Definitions
None.  
 
Constructors
htmlInputHidden()  
Constructs an empty hidden field object.  
 
htmlInputHidden( const String& name, const String& value )  
Constructs hidden field object, using the specified name and value.  
 
Destructors
virtual ~htmlInputHidden()  
Destroys the object.  
 
Member Methods
NamehtmlInputHidden& Name(const String& name )  
Sets the control name to name, and returns a reference to the object.  
 
NameString Name() const  
Returns the control name as a string.  
 
ValuehtmlInputHidden& Value(const String& value )  
Sets the value of the control to value, and returns a reference to the object.  
 
ValueString Value() const  
Returns the control value as a string.  
 
Print   void Print( ostream& os ) const  
Outputs the object to os.  
 
ClonehtmlObject FAR * Clone() const  
Returns a base-class pointer to a deep copy of the object.  
 
Example
 
See the example in Tutorial:Forms:Hidden Fields  
 
 


©1998 DC Micro Development. All rights reserved.
No portion of this document may be c opied or reproduced without expressed written consent.
html++ is a trademark of DC Micro Development.