Hi!
I'm struggling with development of a field-type module for my content type. I want to create a field-type that will in fact contain 6 boxes, each storing int value. Each value is stored in different column, as described in schema:
function field_map_ranks_field_schema($field)
{
switch ($field['type'])
{
case 'field_map_ranks' :
$columns = array(
'value_1' => array(
'type' => 'int',
'not null' => FALSE
),
'value_2' => array(
'type' => 'int',
'not null' => FALSE
),
'value_3' => array(
'type' => 'int',
'not null' => FALSE
),
'value_4' => array(
'type' => 'int',
'not null' => FALSE
),
'value_5' => array(
'type' => 'int',
'not null' => FALSE
),
);
break;
}
return array(
'columns' => $columns,
);
}
This was done on a basis of 'number' field-type of core package. All functions are now rewritten and are working as I want them to work, except hook_field_widget_form.