1 <!DOCTYPE html><html><head><title>Sencha Documentation Project</title><link rel="stylesheet" href="../reset.css" type="text/css"><link rel="stylesheet" href="../prettify.css" type="text/css"><link rel="stylesheet" href="../prettify_sa.css" type="text/css"><script type="text/javascript" src="../prettify.js"></script></head><body onload="prettyPrint()"><pre class="prettyprint"><pre><span id='Ext-form.field.Hidden-method-constructor'><span id='Ext-form.field.Hidden'>/**
2 </span></span> * @class Ext.form.field.Hidden
3 * @extends Ext.form.field.Base
4 * <p>A basic hidden field for storing hidden values in forms that need to be passed in the form submit.</p>
5 * <p>This creates an actual input element with type="submit" in the DOM. While its label is
6 * {@link #hideLabel not rendered} by default, it is still a real component and may be sized according to
7 * its owner container's layout.</p>
8 * <p>Because of this, in most cases it is more convenient and less problematic to simply
9 * {@link Ext.form.action.Action#params pass hidden parameters} directly when
10 * {@link Ext.form.Basic#submit submitting the form}.</p>
11 * <p>Example:</p>
12 * <pre><code>new Ext.form.Panel({
16 fieldLabel: 'Text Field',
18 value: 'value from text field'
21 name: 'hidden_field_1',
22 value: 'value from hidden field'
28 this.up('form').getForm().submit({
30 hidden_field_2: 'value from submit call'
35 });</code></pre>
36 * <p>Submitting the above form will result in three values sent to the server:
37 * <code>text_field=value+from+text+field&hidden_field_1=value+from+hidden+field&<br>hidden_field_2=value+from+submit+call</code></p>
40 * Create a new Hidden field.
41 * @param {Object} config Configuration options
45 Ext.define('Ext.form.field.Hidden', {
46 extend:'Ext.form.field.Base',
47 alias: ['widget.hiddenfield', 'widget.hidden'],
48 alternateClassName: 'Ext.form.Hidden',
54 initComponent: function(){
55 this.formItemCls += '-hidden';
59 // These are all private overrides
60 initEvents: Ext.emptyFn,
61 setSize : Ext.emptyFn,
62 setWidth : Ext.emptyFn,
63 setHeight : Ext.emptyFn,
64 setPosition : Ext.emptyFn,
65 setPagePosition : Ext.emptyFn,
66 markInvalid : Ext.emptyFn,
67 clearInvalid : Ext.emptyFn
69 </pre></pre></body></html>