PDA

View Full Version : Ext.ux.form.SuperField



danh2000
18 Aug 2008, 5:19 AM
Hi All,

I'm posting an early example version of a custom component that I've put together.

It allows you to collect sub-data in a form via a popup window, allowing you to save on screen real estate.

The collected data is stored in hidden fields and a custom summary can be displayed to the user.

The easiest way to explain is with some examples:

http://technomedia.co.uk/superfield/examples.html

Disclaimer

This is an early example release so there is lots of refactoring to do and some things that I haven't worked out yet, but I'm open to feedback, suggestions, bugs etc.

The css needs a massive overhaul, as does a lot of the code, but I'll post updates every few days or so if anyone is interested.

mjlecomte
18 Aug 2008, 6:42 AM
Pretty cool. A new perspective on the "grids" in forms concept.

Only thing I can think of for constructive criticism at the moment is to consider making the "add item" feature configurable. Looks like that item is working against your "conserve real estate" concept. Not sure, but maybe some identifier in the header row or maybe even the option to add items via context menu or maybe when someone hovers over the header a qtip type menu appears with the add option. Those are kind of implementation specific perhaps, hence my thought to possibly leave a config option in somehow.


Oh, and probably need an option to edit those fields somehow as opposed to having to delete the row and then recreate it?

moegal
18 Aug 2008, 6:55 AM
Very nice, just what I am looking for except I need the edit feature as well

Nice job, Marty

danh2000
18 Aug 2008, 9:05 PM
Thanks for the feedback - I'll add Edit functionality to the next release.

I agree about the add button and to be honest the whole look and feel needs addressing, I just wanted to get an early release up initially.

I'll post here again when I've made some changes.

razor
13 Oct 2008, 6:07 AM
Very nice work.. handy to use when adding telephone numbers and/or email adds to an client form.

Will use part of your code, thanks!

nouveauc
14 Oct 2008, 9:50 AM
This is my first post, i am beginner and francophon,so sorry for my bad english. I update the code on the itemsForm on the save button. you can configure the display text.
replace this (line 8)


Ext.ux.form.SuperField = {
items : [],
allowEdit: true,...
by this


Ext.ux.form.SuperField = {
items : [],
saveText:"Enregistrer",// add here
allowEdit: true,...
and this


buttons : [{
text : "Save",//here
tabIndex: ti,
handler : function(){
var f = this.itemsForm.form;
by this


buttons : [{
text : this.saveText,//here
tabIndex: ti,
handler : function(){
var f = this.itemsForm.form;
There are some problems when you use combobox;the Superfiled.getValue() return the displayfield of combobox and not the valuefield. I am updating.

danh2000
14 Oct 2008, 8:11 PM
This is my first post, i am beginner and francophon,so sorry for my bad english. I update the code on the itemsForm on the save button. you can configure the display text.
replace this (line 8)


Ext.ux.form.SuperField = {
items : [],
allowEdit: true,...
by this


Ext.ux.form.SuperField = {
items : [],
saveText:"Enregistrer",// add here
allowEdit: true,...
and this


buttons : [{
text : "Save",//here
tabIndex: ti,
handler : function(){
var f = this.itemsForm.form;
by this


buttons : [{
text : this.saveText,//here
tabIndex: ti,
handler : function(){
var f = this.itemsForm.form;
There are some problems when you use combobox;the Superfiled.getValue() return the displayfield of combobox and not the valuefield. I am updating.

Thanks for the feedback - I'll look into the ComboBox issue.

When time permits I will go back and refactor and fix up a lot of this - in the meantime it should be treated as a Proof Of Concept.

Scorpie
14 Oct 2008, 11:54 PM
Very nice ! A whole new approach to inputting data!

danh2000
14 Oct 2008, 11:59 PM
Thanks :)

I'll be fixing up this component within the next 3 or 4 weeks - my project is now moving from a Proof of Concept to a real development effort.

I've had a few suggestions on my blog post which I'll be implementing, but generally tiyding up the code and make everything more configurable.

danh2000
20 Oct 2008, 7:36 PM
There are some problems when you use combobox;the Superfiled.getValue() return the displayfield of combobox and not the valuefield. I am updating.


Sorry for the slow reply about this.....

You need to specify the hiddenName config attribute on the combobox to ensure that the value get's submitted and not just the name.... this does have an impact on the summary display of the superfield - it'll currently show the value of the combo in the summary - the label/text would be better for display - I'll look at implementing this in the next version.

jay@moduscreate.com
26 Oct 2008, 6:22 AM
Pretty cool dude!