inputEx - HiddenField Usage

Basic HiddenField creation

The hidden field is by definition 'invisible', so there isn't a lot to see. However, it can be useful to keep an id :

var exampleDiv = YAHOO.util.Dom.get('container1'); var group = new YAHOO.inputEx.Group({ fields: [ {type: 'hidden', inputParams: {name: 'id', value: 12 } }, {inputParams: {label: 'Firstname', name: 'firstname', required: true, value:'Jacques' } } ], parentEl: exampleDiv }); var button=YAHOO.inputEx.cn('button',null,null, 'Get Value'); exampleDiv.appendChild(button); YAHOO.util.Event.addListener(button, 'click', function(){ alert(YAHOO.lang.JSON.stringify(group.getValue()) ); });