4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5 <title>The source code</title>
6 <link href="../prettify/prettify.css" type="text/css" rel="stylesheet" />
7 <script type="text/javascript" src="../prettify/prettify.js"></script>
8 <style type="text/css">
9 .highlight { display: block; background-color: #ddd; }
11 <script type="text/javascript">
12 function highlight() {
13 document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
17 <body onload="prettyPrint(); highlight();">
18 <pre class="prettyprint lang-js"><span id='Ext-form-field-Hidden-method-constructor'><span id='Ext-form-field-Hidden'>/**
19 </span></span> * @class Ext.form.field.Hidden
20 * @extends Ext.form.field.Base
21 * <p>A basic hidden field for storing hidden values in forms that need to be passed in the form submit.</p>
22 * <p>This creates an actual input element with type="submit" in the DOM. While its label is
23 * {@link #hideLabel not rendered} by default, it is still a real component and may be sized according to
24 * its owner container's layout.</p>
25 * <p>Because of this, in most cases it is more convenient and less problematic to simply
26 * {@link Ext.form.action.Action#params pass hidden parameters} directly when
27 * {@link Ext.form.Basic#submit submitting the form}.</p>
28 * <p>Example:</p>
29 * <pre><code>new Ext.form.Panel({
33 fieldLabel: 'Text Field',
35 value: 'value from text field'
38 name: 'hidden_field_1',
39 value: 'value from hidden field'
45 this.up('form').getForm().submit({
47 hidden_field_2: 'value from submit call'
52 });</code></pre>
53 * <p>Submitting the above form will result in three values sent to the server:
54 * <code>text_field=value+from+text+field&hidden_field_1=value+from+hidden+field&<br>hidden_field_2=value+from+submit+call</code></p>
57 * Create a new Hidden field.
58 * @param {Object} config Configuration options
62 Ext.define('Ext.form.field.Hidden', {
63 extend:'Ext.form.field.Base',
64 alias: ['widget.hiddenfield', 'widget.hidden'],
65 alternateClassName: 'Ext.form.Hidden',
71 initComponent: function(){
72 this.formItemCls += '-hidden';
76 // These are all private overrides
77 initEvents: Ext.emptyFn,
78 setSize : Ext.emptyFn,
79 setWidth : Ext.emptyFn,
80 setHeight : Ext.emptyFn,
81 setPosition : Ext.emptyFn,
82 setPagePosition : Ext.emptyFn,
83 markInvalid : Ext.emptyFn,
84 clearInvalid : Ext.emptyFn