UMN Usability / DROP task: Add autocomplete suggestion for "machine readable name"

catch - February 25, 2008 - 23:39
Project:Content Construction Kit (CCK)
Version:6.x-1.x-dev
Component:Usability
Category:task
Priority:normal
Assigned:Unassigned
Status:active
Description

When you set up a cck field, you have to add both a human readable name, and a machine readable name. We're in the process of moving this to the same screen (they're currently split over two forms). When on the same screen, it'd be nice to auto-fill the machine readable name from the human readable name - i.e. "news" becomes [field_]news.

So two things:

1. strip disallowed characters from the human readable name
2. use this to pre-fill the machine readable textfield (there's a similar technique in the D6 installer for admin e-mail).

#1

KarenS - February 27, 2008 - 12:38
Title:DROP task: Add autocomplete suggestion for "machine readable name"» UMN Usability / DROP task: Add autocomplete suggestion for "machine readable name"
Component:content.module» Usability

#2

yoroy - March 14, 2008 - 00:14

Does the machine readable formfield have to be shown by default at all?

Why not initially hide it and let a script parse a machine readable version of the 'normal' name?
This machine readable version could still be displayed, maybe something like the password strength feedback in core:
____________________________________

name: *
[my gr3@t txtfield!!1] (machine readable: mygrttxtfield)
____________________________________

If you click to edit another standard textfield is added underneath:

____________________________________

name: *
[ ]

machine readable name: *
[ ]
____________________________________

#3

KarenS - March 14, 2008 - 10:47

Not completely sure I understand the example, but the machine readable name must be editable. This is because there are situations when you want to control what it is, something that has come up often in the past. We also have to check whether the name is available or already taken before using it. So we may need an ajax callback to get an available name.

#4

qbnflaco - March 30, 2008 - 03:15

I did something similiar to this for the content type for. Human-readable gets converted to machine-readable via jQuery and gets pre-filled. If you tab to the next field you can still change it. Take a look at this patch for the js file.

#227052: DROP: when the user adds a content type, base the type on the name using javascript

 
 

Drupal is a registered trademark of Dries Buytaert.