View Full Version : onClick to text field?

2 Nov 2007, 11:00 AM
Is there a way or extension to use that you can click a link and change the desired text into a text field?

2 Nov 2007, 11:03 AM
yes, basically you add click a listener, then assign a handler that changes the the div to a text field.

2 Nov 2007, 11:18 AM
There is a class designed for this called Ext.Editor (http://extjs.com/deploy/ext/docs/output/Ext.Editor.html).

To use it:
First create a form field relevant to your content like a Ext.form.TextArea
Bind the form field to the editor by passing it in to the first argument of the constructor
Then you can call the editors startEdit method on the element (div) which you'd like to edit.

2 Nov 2007, 12:07 PM
thanks acon and liquid. Ill check it out. I'f i run into problems or questions, ill be back.

2 Nov 2007, 10:57 PM
Can you show an example? I seriously don't know where/how to start. I've read the tuts and docs but I still don't get it. I think it's because I'm so new to it all.

5 Nov 2007, 9:46 PM
Anyone have an idea to do this? The extjs documentation is not really helpful to newbies like me.

6 Nov 2007, 2:39 AM

6 Nov 2007, 9:39 AM
Yeah that's what I'm using right now, it's just a textfield with css that hides the border and background of the field. I don't reallt like it. I'm looking more into in-place editing, but without grids.

6 Nov 2007, 9:45 AM
That's a nice extension that I had not seen yet. I will try to put together an example for you of using the Editor sometime this week but the end result is not going to be that much different than the user extension.