Display an info text in a HTML input field if its focus is lost

Now that with Ext Core a light-weight version (just 25kB) of ExtJS has been released, I thought it’s time to build a nice example with it. The result is something very useful that you can see in actually a lot of web sites: Display a info text inside of a input text field if it is empty and does not have the focus. Here’s how it looks like: E-Mail: To add this behaviour to a input field you just have to call this single line:...

June 12, 2009 · 1 min · admin

Mark Required Fields in a ExtJS Form

May 4, 2009 · 0 min · admin

Phone number selector in ExtJS

Wouldn’t it be nice to use a combo box of flag images to select the country code of phone numbers? If you use a country selection component that’s quite easy. Just wrap it in a re-usable component together with a textfield for the local number and the result looks like this: And here’s the example’s source: Ext.onReady(function(){ var panel = new Ext.FormPanel({ style: 'padding: 10px;', frame: true, labelWidth: 50, width: 400, items: [{ fieldLabel: 'Mobile', xtype: 'phonefield', anchor: '100%', emptyText: '(e....

April 8, 2009 · 1 min · admin

Component for selecting multiple items in Ext

Ext already provides a component to select multiple items. The thing I do not like about it is that it covers too much space on the screen. Therefore I thought of a component that initially looks like a combo box and then opens a new window to let the user select the items. As a nice example tells more than thousand words - here it is: As you can see, it is actually based on the component provided by the Ext examples....

April 8, 2009 · 2 min · admin

Getting values from a form containing combos in Ext

Actually it is pretty easy to get the values of all fields of a form in Ext: You just have to call the getValues() method of the BasicForm. The problem with that approach is that it just takes the values directly from the DOM and is not calling the getValue() for each field (Which I assumed). One consequence is that you don’t get the values of combo boxes, but their labels....

April 7, 2009 · 1 min · admin