46
I did not understand why this code works in class/field.php:
// New Field
$main = ($table_autoincrement == 1) ? 2 : 1;
$check_field_main = new TDMCreateFormRadio('', 'field_main['.$i.']', $main);
$check_field_main->addOption($i, _AM_TDMCREATE_FIELD_MAINFIELD );
$parameters_tray->addElement($check_field_main);
and that no:
// New Field
$main = ($table_autoincrement == 1) ? 2 : 1;
$check_field_main = new TDMCreateFormRadio('', 'field_main', $main);
$check_field_main->addOption($i, _AM_TDMCREATE_FIELD_MAINFIELD );
$parameters_tray->addElement($check_field_main);
For when editing, however if this code:
// Edit Field
$field_main[$field_id] = $field->getVar('field_main');
$main_field = ($field_main[$field_id] == 1) ? $id : 1;
$check_field_main = new TDMCreateFormRadio('', 'field_main['.$i.']', $main_field);
$check_field_main->addOption($main, _AM_TDMCREATE_FIELD_MAINFIELD );
$parameters_tray->addElement($check_field_main);
should work anyway, unfortunately when you click on an option, then activate them all, and goes to save the last of selected list