Hi,
So I suppose that you'r trying to do such selection with a custom field of the table "order".
I think that's a good idea.
The simplest will be to edit the file "custom_fields" of the view "checkout" via the menu Display>Views.
There, you'll get the dropdown HTML in the return of the function call:
$this->fieldsClass->display(
$oneExtraField,
$this->$type->$fieldName,
'data['.$type.']['.$fieldName.']',
false,
' '.$onWhat.'="hikashopToggleFields(this.value,\''.$fieldName.'\',\''.$type.'\',0);"'
);
so just add some str_replace on that HTML to insert your optgroup in the dropdowns where you need them.