(3 intermediate revisions by one other user not shown)
Line 2: Line 2:
 
hidden
 
hidden
 
===Type===
 
===Type===
_input
+
input
 
===Synopsis===
 
===Synopsis===
 
How to render a hidden input field  
 
How to render a hidden input field  
 
===Description===
 
===Description===
_input elements of type hidden let web developers include data that cannot be seen or modified by users when a form is submitted. For example, the ID of the content that is currently being ordered or edited, or a unique security token. Hidden inputs are completely invisible in the rendered page, and there is no way to make it visible in the page's content.
+
input elements of type hidden let web developers include data that cannot be seen or modified by users when a form is submitted. For example, the ID of the content that is currently being ordered or edited, or a unique security token. Hidden inputs are completely invisible in the rendered page, and there is no way to make it visible in the page's content.
 
===Parameters===
 
===Parameters===
 
type="hidden"
 
type="hidden"
Line 13: Line 13:
 
===Example===
 
===Example===
 
<syntaxhighlight lang="html">
 
<syntaxhighlight lang="html">
<_input type="hidden" name="token" value="123231321" />
+
<input type="hidden" name="token" value="123231321" />
 
</syntaxhighlight>
 
</syntaxhighlight>
 
===Note===
 
===Note===
While the value isn't displayed to the user in the page's content, it is visible—and can be edited—using any browser's developer tools or "View Source" functionality. If you want to create a secure field, then use _input type="secure".
+
While the value isn't displayed to the user in the page's content, it is visible—and can be edited—using any browser's developer tools or "View Source" functionality. If you want to create a secure field, then use input type="secure". When using action="get" a ''secure'' field will '''not''' be returned in the url, when using action="get" a ''hidden'' field '''will''' be returned in the url.
 
===Links===
 
===Links===
 
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/hidden
 
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/hidden
ws-class-props
Line 1: Line 1:
 
{{Doc properties
 
{{Doc properties
|Subject version=2.0
+
|Subject version=2.0,2.1
 
|Doc subject=DevOps:Doc/FlexForm
 
|Doc subject=DevOps:Doc/FlexForm
 
|Doc parent=DevOps:Doc/FlexForm/1.0/input
 
|Doc parent=DevOps:Doc/FlexForm/1.0/input
 
|Doc sort order=110
 
|Doc sort order=110
 
|Doc target group=User
 
|Doc target group=User
 +
|Doc synopsis=How to render a hidden input field
 
}}
 
}}

Latest revision as of 11:36, 11 July 2023

Name

hidden

Type

input

Synopsis

How to render a hidden input field

Description

input elements of type hidden let web developers include data that cannot be seen or modified by users when a form is submitted. For example, the ID of the content that is currently being ordered or edited, or a unique security token. Hidden inputs are completely invisible in the rendered page, and there is no way to make it visible in the page's content.

Parameters

type="hidden"

All other valid parameters for an input field are valid

Example

<input type="hidden" name="token" value="123231321" />

Note

While the value isn't displayed to the user in the page's content, it is visible—and can be edited—using any browser's developer tools or "View Source" functionality. If you want to create a secure field, then use input type="secure". When using action="get" a secure field will not be returned in the url, when using action="get" a hidden field will be returned in the url.

Links

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/hidden