This patch was created for a site where we want to keep the UI as simple as possible, so we are looking to stamp out as much UI/config as possible. To this end, we wanted to remove machine names from the UI and let the code handle them, as setting a custom machine name or editing one was deemed unnecessary for our users.

Obviously the usefulness of this patch is subjective but I believe Drupal moved closer to this line of thinking with the introduction of the machine_name type field in D7.

Comments

evanbarter’s picture

StatusFileSize
new4.5 KB

Attaching patch.

drclaw’s picture

Status: Needs review » Fixed

Committed!

roball’s picture

Status: Fixed » Active

Will this still allow the admin to change the display value of an option, while keeping its internal key, so it does not break all existing submitted forms?

For example, if the original value pairs for a selection field was

001|Femmale
002|Male

and later we recognize and correct the typo so we update the value pairs to

001|Female
002|Male

?

drclaw’s picture

Status: Active » Fixed

Hi @roball

This patch actually only removes the visible machine name from the name of the entire value set. The values themselves still have visible keys.

Thanks!
drclaw

roball’s picture

Version: 6.x-1.3 » 6.x-1.5

Ah, sounds good. Didn't try it yet, just wanted to ensure that a good feature wasn't removed.

So, it is still possible to add a value within two existing ones? For example, if I have

100|Red
200|Green

can I expand it later to

100|Red
150|Yellow
200|Green

without breaking the existing submissions? Thanks for clarification.

drclaw’s picture

Yep, all the handling of values is the same.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.