catalinux
catalinux

Reputation: 1452

Popup window for complex structured data in an extjs form field

I need to build the following form field. Let's take the case where in a form I have multiple fields. Two of them are "last name" and "first name". Instead of the classic way when these field will show seperatley I want a single fields thatt shows when completed like a text field with value a concatenqtion of e two values ( ie "michael jackson"). When I click on the field an window (like a picker date) will popup haing a form with the two fields.

Unfortunately i do not know where to start from:

I might have complex structure with 5-6 fields in this picker popup.

Upvotes: 1

Views: 596

Answers (1)

existdissolve
existdissolve

Reputation: 3114

I would extend Ext.form.field.Picker. In the createPicker() method you can crate whatever combination of fields an components that you want.

Re: storage of data, I'd serialze the values in the one field. Then you can treat reads and commits in the same way (and you can always manipulate the data later.

Here's an example that I did a while back: jsfiddle.net/existdissolve/wMcQk/

Upvotes: 1

Related Questions