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'>/**
19 </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 Ext.define('Ext.form.field.Hidden', {
58 extend:'Ext.form.field.Base',
59 alias: ['widget.hiddenfield', 'widget.hidden'],
60 alternateClassName: 'Ext.form.Hidden',
66 initComponent: function(){
67 this.formItemCls += '-hidden';
71 // These are all private overrides
72 initEvents: Ext.emptyFn,
73 setSize : Ext.emptyFn,
74 setWidth : Ext.emptyFn,
75 setHeight : Ext.emptyFn,
76 setPosition : Ext.emptyFn,
77 setPagePosition : Ext.emptyFn,
78 markInvalid : Ext.emptyFn,
79 clearInvalid : Ext.emptyFn