PDA

View Full Version : Form Field Modes



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)

dawesi
6 Mar 2008, 8:23 PM
Here's an example that Animal did for text fields:

http://extjs.com/forum/showthread.php?p=130697#post130697

jerrybrown5
25 Mar 2008, 11:47 AM
I think this logic become more natural when you have a local form repository off of an object or table. I have taken this approach in my development.