Fork me on GitHub

inputEx

Jump to Table of Contents

inputEx - Styling descriptions

Styling the field descriptions

ou can style the description to appear when the field is focused :

CSS

#sampleGroup div.inputEx-description { display:none; }
#sampleGroup div.inputEx-focused div.inputEx-description { display: block; }

Javascript

var descriptedFields = [ 
    { type: 'select', label: 'A select', description: 'Select one', choices: ['One','Two','Three'] },
    { label: 'StringField', description: 'Here is the description', value:'Jacques' },
    { type:'boolean', description: 'Check this box if you are happy to be there', label: 'Happy to be there ?', name: 'email'},
    { type:'url', description: 'Your blog url', label: 'Website', name:'website'},
    { type: 'radio', label: 'Radio', description: 'My favorite is YUI', name: 'example1', choices: ['Ajaxian','YUI blog','other']},
    { type: 'text', label: 'Comments', description: 'Enter your comment'}
];

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