User login

fields

Deleting Drupal Fields Programmatically (So As to Change Field Type with Features)

In brief: The code at the bottom of this post deletes the named fields. If you are changing the field type for one or more fields, put it in an update hook for a feature module and run update.php before running features revert, your feature will happily rebuild the fields with their new settings. This destroys data.

FieldException: Cannot change an existing field's type. in field_update_field() (line 230 of /home/ben/code/sdl/web/modules/field/field.crud.inc).

Field labels should be number of items / plural aware

Ideal would be on the field settings, or possibly the field display settings, you can set what the singular and what the plural should be.

I don't think automatic adding of an s would work so well.

Point is you have a link field for entering web sites, it should say web site if there is one and web sites if there are multiple.

An Online Account / Social Media field type

You enter your username or ID and check off all the places it applies: Twitter, Facebook, IRC, etc.

There's a bit of a pitfall for places like drupal.org where your profile URL is not based on the username.

Or should it be entirely do-it-yourself?

My username/ID is:
On website:

Exportable field content: machine names for field instances?

When fields are used for configuration-like stuff (this is for AJAX form messages) it would make sense to be able to export field instances to code (as opposed to, say, node or comment fields).

asked, to no avail:

11:37 benjamin-agaric: is there a standard / anything anyone's tried for giving programatically-created field instances a machine name type thing

Storage structure for AJAX Form Messages

By using field storage, we get access to translation.

We've defined the info files, made them dependent on the core module. That was fun!

Caching is fun to implement, but try to hold off until you have all your functionality in place. As someone somewhere surely said (OK, it was Donald Knuth), "Premature optimization is the root of all evil."

We could define our form messages as a nested array analogous to menu definitions— a form ID,

Fields offer the advantage of understanding translation for user-entered data. Therefore, using fields, there's a potential

Fields, Bundles, and Entities in Drupal 7

Karoly Negyesi (chx) mentioned in IRC "one thing people (like rszrama) is using entities is basically multigroup functionality." "Say, you have something like a line item in an invoice, needs a lot of fields, that becomes an entity. And it's not a node because a node has stuff like promote and sticky which does not apply."

Fields

borrowing from Barry Jaspan, http://www.archive.org/details/DrupalconDC2009-FieldAPIDrupal7

Syndicate content