I've got a module that I'm developing (I'm admittedly new to module development) - where I'm appending a date to the IEF fields displayed. It looks like this so far.
function customized_inline_entity_form_table_fields_alter(&$fields, $context) {
// Make sure there's a stock field on each of the allowed product types.
$is_tender_detail = FALSE;
foreach ($context['allowed_bundles'] as $bundle) {
if ($bundle=='rate') {
$is_rate = TRUE;
}
}
if ($is_rate) {
$fields['field_rate_dates'] = array( // This part adds the body field with a label 'description'
'type' => 'field',
'label' => t('Dates'),
'weight' => 101,
);
}
}
So far - so good. I want to display the relevant dates in field "field_rate_dates" - and they're displaying in the table.
Where I'm getting hung up is - IEF appears to be rendering the order randomly. I would like to output the order by the date I'm appending there ("field_rate_dates") ASC - and I've been unable to find any hints on how to get that done.
Any help would be greatly appreciated :)