JSFiddle - React, Tailwind, and code Playground

by kien16

HTML

<link rel="stylesheet" href="http://cdn.sencha.io/ext-4.1.1-gpl/resources/css/ext-all.css">

JavaScript

/*global Ext:false */
Ext.onReady(function () {
    Ext.create('Ext.form.Panel', {
        title: 'Basic Form',
        renderTo: Ext.getBody(),
        bodyPadding: 5,
        width: 350,
        url: 'save-form.php',
        items: [{
            labelAlign : 'right',
	    	labelWidth: 72,
	    	width:300,
			xtype: 'displayfield',
            fieldLabel: 'How to get',
			name: 'dis',
			value: 'Hello'
        }],
        buttons: [{
            text: 'Submit',
            handler: function () {
                var form = this.up('form').getForm();
                var values = form.getValues();
                alert(values['dis']);       
            }
        }]
    });
});