inputEx - Lenses Usage

Basic lens creation

Use the following code to create a basic inputEx lens.

			var g = new Y.inputEx.Lens({
				parentEl: 'container1',
				fields: [
					{ typeInvite: 'Firstname',name: 'firstname'  },  
					{ typeInvite: 'Lastname', name: 'lastname' },
					{ typeInvite: 'Email', name: 'email' },
					{ type: 'url', name: "picUrl", typeInvite: 'url' },
					{ type: 'map', name: "position", width: '800px', api: 'google'}
				],
				value: {
					firstname: 'Lena',
					email: 'lena@doe.org',
					picUrl: 'http://www.limsi.fr/Individu/vezien/lena.jpg',
					position: {"lat":48.821332549646634,"lon":1.47216796875,"nzoom":6,"uzoom":-6}
				},



				lens: "
"+ "
"+ "
"+ "
"+ "
"+ "
", visus: [ null, null, { visuType: 'func', func: function(val) { return ""+val+""; } }, { visuType: 'func', func: function(val) { return ""; } }, { visuType: 'func', func: function(val) { return "lat:"+val.lat+",long:"+val.lon; } } ] });