Closed (fixed)
Project:
Drupal core
Version:
7.4
Component:
other
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
3 Sep 2011 at 12:14 UTC
Updated:
12 Oct 2011 at 18:31 UTC
Jump to comment: Most recent
We want to create a custom cck field that contain group of textfield, checkbox and file cck. Please explain it with details,
(Need to add multiple Custom CCK Text Fields with each file attachment and date field and check boxes)
Comments
Comment #1
rahul_singh commentedPlz tell me hw to show the file attachment field with the schema. and also give the module file in which we defined the these element in our front end.
Comment #2
marcingy commentedThis is a support request
Comment #3
rahul_singh commented/**
* Implements hook_install().
*/
function collabfield_install() {
}
/**
* Implements hook_uninstall().
*/
function collabfield_uninstall() {
}
/**
* Implementation of hook_field_schema().
*/
function collabfield_field_schema($field) {
if ($field['type'] == 'collabfield') {
$schema['columns']['name'] = array(
'type' => 'varchar',
'length' => '255',
'not null' => FALSE,
);
$schema['columns']['position'] = array(
'type' => 'varchar',
'length' => '255',
'not null' => FALSE,
);
$schema['columns']['telephone'] = array(
'type' => 'varchar',
'length' => '255',
'not null' => FALSE,
);
$schema['indexes'] = array(
'name' => array('name'),
'position' => array('position'),
'telephone' => array('telephone'),
'fid' => array('fid'),
//'mail' => array('mail'),
);
return $schema;
}
}
I havecreated the text field but ididnot able to crate the file attachment hw we create the schema for file attachment.
Comment #4
Anonymous (not verified) commentedTry using the field_example in Examples for Developers.
Comment #5.0
(not verified) commentedNeed to add multiple Custom CCK Text Fields with each file attachment and date field and check boxes