-
19 Mar 2008 8:47 PM #1
Clickable Form Textfiled Label
Clickable Form Textfiled Label
I have a form in a 2 column layout with 12 fields and I'd like to be able to fire / handle a field specific event when a user clicks. Is there a way to convert the field label into a text hyperlink? Should I use an action here next to the label? a button? Users prefer this to be next to the textfields rather than in the toolbar.
Any suggestions welcome.
Thanks,
Ron
-
20 Mar 2008 12:53 AM #2
Add a click handler to the Panel's body Element.
In the handler, check that the event is fired from a label:
See http://extjs.com/deploy/dev/docs/?cl...mber=getTargetCode:labelClickHandler: function(e) { var t = e.getTarget('label'); if (t) { // Access the form Field. var f = Ext.getCmp(t.for); } },
You can add :hover rules to your stylesheet to give the labels some kind of indication that they are live (In modern browsers... and they are certainly what we target, they are free to download).
http://www.w3.org/TR/CSS21/selector....pseudo-classesSearch the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642


Reply With Quote