Fork me on GitHub

inputEx

Jump to Table of Contents

inputEx - Label styling demo

Example of label styling

Let's position the labels on top of the fields

CSS

#sampleGroup div.inputEx-label {
    float:none;
    text-align: left;
}

Javascript

// Example 1
var descriptedFields = [ 
    { type: 'select', label: 'A select', choices: ['One','Two','Three'] },
    { label: 'StringField', value:'Jacques' },
    { type:'boolean', label: 'Happy to be there ?', name: 'email'},
    { type:'url', label: 'Website', name:'website'},
    { type: 'radio', label: 'Radio', name: 'example1', choices: ['Ajaxian','YUI blog','other']},
    { type: 'text', label: 'Comments'}
];

new Y.inputEx.Group({
    id:'sampleGroup',
    parentEl: 'container1',
    fields: descriptedFields,
    legend: 'User Informations'
});