[#6615] New contact and disabled "name" field
Summary New contact and disabled "name" field
Queue Turba
Queue Version Git master
Type Enhancement
State Assigned
Priority 2. Medium
Owners Horde Developers, chuck@horde.org
Requester thomas.jarosch@intra2net.com
Created 2008-04-17 (4434 days ago)
Due
Updated 2009-08-02 (3962 days ago)
Assigned 2008-06-12 (4378 days ago)
Resolved
Milestone
Patch No

Comments
thomas.jarosch@intra2net.com 2008-04-17 10:02:36
Hello together,



when you create a new contact, the first thing the user will try is to 
type in the "name" field, which is a composite of firstname, lastname 
and others.

The control is disabled and dynamically updated via Javascript.



Would it be possible to replace the disabled widget by text only

and still update it via Javascript? Other ideas?



Thomas



Michael Rubinsky <mrubinsk@horde.org> 2008-04-17 15:39:24
Wouldn't it be more confusing for users to be able to type into a text 
field and have the value ignored or overwritten when the last/first 
name fields are edited?



You could always remove the 'name' field from display if it's really 
bothersome for your users.

Chuck Hagenbuch <chuck@horde.org> 2008-04-17 15:41:10
I think the idea is to make it not a text field, right?

Michael Rubinsky <mrubinsk@horde.org> 2008-04-17 15:49:15
> I think the idea is to make it not a text field, right?



Yea, that makes sense, my bad :)



The idea about removing it from the display if your using a tabbed 
display is still an option though.

Chuck Hagenbuch <chuck@horde.org> 2008-04-17 20:16:22
Not sure what tabs have to do with it?



I modified Horde_Form_Renderer so that disabled variables are wrapped 
in a class="form-disabled". Can we work with that and CSS to make it 
look like text?

Michael Rubinsky <mrubinsk@horde.org> 2008-04-17 20:31:30
> Not sure what tabs have to do with it?



If you use the optional 'tabs' entry in cfgSources, you can omit the 
'name' attribute from any of the tabs so it will not display.  I know 
it's not the best solution, but was offered as another option if 
nothing else would work. :)



thomas.jarosch@intra2net.com 2008-04-23 16:39:17
Is it possible to define a default field value for new contacts?



The root of the problem is that the user does not really see that the 
form field is disabled as it's empty by default. If the field would 
contain something like "firstname lastname" and then gets cleared the 
first time a user types something in the firstname field, all would be 
fine.



Chuck Hagenbuch <chuck@horde.org> 2008-04-23 21:29:28
> Is it possible to define a default field value for new contacts?



It is now. Unfortunately that doesn't completely solve the problem 
since the updating field is initialized onload, so even if you give 
'name' a default value, it gets immediately wiped to '' once the form 
loads, since 'firstname' and 'lastname' are empty.



What about the idea of using CSS to make it not look like a form field?

liamr@umich.edu 2008-04-24 14:54:28
How about showing the composite field (but not the component fields) 
on the display tab.. and showing the component fields (but not the 
composite fields) on the edit tab?

Chuck Hagenbuch <chuck@horde.org> 2008-04-27 18:18:04
Seems like a good system to me, though requires a bit more work to 
determine which are which. I'll work on it.

Chuck Hagenbuch <chuck@horde.org> 2008-05-12 20:55:11
This should probably wait for after the feature freeze since it didn't 
get started - yes?

Thomas Jarosch <thomas.jarosch@intra2net.com> 2008-05-13 07:22:04
> This should probably wait for after the feature freeze since it

> didn't get started - yes?



No hurry over here.