View Full Version : textfield -> textarea trigger
seppy
24 Sep 2008, 9:32 AM
hey guys,
i'm looking for a textfield trigger which changes the type of textfield to texarea.
has someboy any idea how to solve this?
I attached an screenshot for better understanding.
thx for help or ideas
evant
24 Sep 2008, 4:51 PM
It's not quite what you wanted, but you could check this out: http://extjs.com/forum/showthread.php?t=24368
seppy
25 Sep 2008, 10:41 AM
this doesnt solve my problem, i need an input field if the user wants to add one email address, and an textarea for many addresses.
seppy
26 Sep 2008, 10:39 AM
no more ideas? (:|
Animal
26 Sep 2008, 10:48 AM
It's not really that difficult. Extend TriggerField.
Override onRender to add a <textarea> element after the <input>, but make it hidden.
Implement onTriggerClick to toggle the visibility between the <input> being visible and the <textarea> being visible.
You will have to use a DOM 'change' event listener on each input to synchronize the values.
I doubt this will be added as a feature to Ext. You are going to havew to do some work. Just start, you'll soon get it working.
akannu
13 Oct 2008, 1:23 PM
Just a usability question. If the screen supports use case for multiple addresses and if it is just a matter of end user preference whether they want to enter 1 or multiple, is it better to just provide a text area always (with help text for comma separation entry) instead of expecting the user to learn that the trigger icon toggles between the two different input controls and developers having to deal with what to do with any current values when you toggle back and forth.
I agree that the UI will take only less space when one email address is desired, but if there is room in the UI it may be better to keep it simple.
If I am missing something, let me know
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.