Just so you know, and after much code sniffing, I finally have a working solution :
First, the custom field may start with wpcf-
(for example: wpcf-custom-field
). This prefix may be ignored and only the remaining characters kept. As in
$customField = substr($fieldName, 5); // $fieldName="wpcf-custom-field";
Now, the custom field data may be fetch via the function wpcf_admin_fields_get_field
which is located in the Types plugin directory under includes/fields.php
. For example :
$fieldConfig = wpcf_admin_fields_get_field($customField);
Among other things, the options may be collected with this code :
$fieldOptions = array();
if (isset($fieldConfig['data']['options'])) {
foreach ($fieldConfig['data']['options'] as $option) {
$fieldOptions[$option['title']] = $option['value'];
}
}
Which, if the custom field is a type select, will return an array like
array(
'1' => 'Option A',
'2' => 'Option B',
'3' => 'Option C'
);