I like this module for what it is but because I needed to integrate the field with the fillPDF module via tokens, I had to do some code cutting and pasting from another module I had which supported tokens. This is cut and pasted from the phone cck module, and 'phone' has been replaced by 'sin.' I am not much of a coder so unfortunately I will have to leave this up to somebody else to create a patch but it was easy enough to add at the end of the .module file.


/**
* Implementation of hook token_list
*/
function sin_token_list($type = 'all') {
if ($type == 'field' || $type == 'all') {
$tokens['sin']['raw'] = t('Raw sin numbers');
$tokens['sin']['formatted'] = t('Formatted sin numbers');
return $tokens;
}
}

/**
* Implementation of hook token_values
*/
function sin_token_values($type, $object = NULL, $options = array()) {
if ($type == 'field') {
$item = $object[0];
$tokens['raw'] = $item['value'];
$tokens['formatted'] = $item['view'];
return $tokens;
}
}

Comments

thierry_gd’s picture

Status: Active » Fixed

Taken into account in 6.2.8 version

Status: Fixed » Closed (fixed)

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