[development] Drupal 7 - field list_text for a new node type - programmatically

linuxlover linuxloverstaff at gmail.com
Tue Jun 7 13:49:43 UTC 2011


Hi,
I use Drupal7,
I'm making a module to define a new node type, I need to do it
programmatically.

I don't know how to define options of a list_text type field.

Can you help me?


    function _mymodule_installed_fields() {
       $t = get_t();
       return array(
          'mymodule_fieldname' => array(
             'field_name' => 'mymodule_fieldname',
             'label'         => $t('Field Name'),
             'type'          => 'list_text',
          ),
       );
    }
Thanks!
Adm


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Questa =?ISO-8859-1?Q?=E8?= una parte del messaggio
	firmata digitalmente
Url : http://lists.drupal.org/pipermail/development/attachments/20110607/85d00072/attachment.bin 


More information about the development mailing list