Giedrius Giedrius - 9 months ago 33
Javascript Question

How do I get a input value on ExtJS 6.0

I wonder how do I get the input value from the form in ExtJS.
I have tried several ways "see comments", but none of them gave me a value, i get an error mostly - "undefined".

Another thing that is unclear is where is form name defined ?

Here's my code:

Ext.onReady(function() {

Ext.create('Ext.form.Panel', {
renderTo: document.body,
title: 'Convert Roman characters to Arabic',
height: 150,
width: 300,
bodyPadding: 10,
defaultType: 'textfield',
items: [
fieldLabel: 'Enter Roman Character',
name: 'char'
buttons: [
text: 'Submit',
handler: function() {
//var form = formPanel.getForm();
//var value = form.findField('char');
//var form = this.up('form'); // get the form panel
//var value = Ext.getCmp('char').getValue();
// var field = Ext.getCmp('char');
Ext.Msg.alert('Success', "value");


In the end the application should alert the inputed value.

Thanks in Advance.

        text: 'Submit',
        handler: function(btn) {