dawesi
6 Mar 2008, 7:47 PM
It would be great to have modes on a form so that you could go from view mode to edit mode without fancy coding....
Example:
You load a form in view mode (or read-only mode):
The fields have the same labels, but instead of textfield, combo, etc the field shows a text representation of the selection ( of course for radio/checkbox the implementation might be to just disable these fields, or maybe have config options for it displayMode: { checkbox: 'readOnly', radio: 'readyOnly', textfield: 'text' }
so when you want to edit the same data, you change the mode from "readable" to "editable" and the form fields come up.
This could easily be implemented on textfield and combo-box based form fields by simply hiding the boxes and trigger field and setting their boxes overflow property to scroll.
idea in progress... feel free to expand in this public topic (http://extjs.com/forum/showthread.php?p=134712#post134712)
Example:
You load a form in view mode (or read-only mode):
The fields have the same labels, but instead of textfield, combo, etc the field shows a text representation of the selection ( of course for radio/checkbox the implementation might be to just disable these fields, or maybe have config options for it displayMode: { checkbox: 'readOnly', radio: 'readyOnly', textfield: 'text' }
so when you want to edit the same data, you change the mode from "readable" to "editable" and the form fields come up.
This could easily be implemented on textfield and combo-box based form fields by simply hiding the boxes and trigger field and setting their boxes overflow property to scroll.
idea in progress... feel free to expand in this public topic (http://extjs.com/forum/showthread.php?p=134712#post134712)