Conditional Profile Field


what would be the easiest way to add the conditional obligatory field for shipping address? (I know that some code modification is needed).

For example If I need to show up obligatory input field for shipping address if the Country or province equals to X.

Would it work if to add the condition for the field element in the template/viewes/profiles/components/profile_field.tpl ?

You should probably ensure proper condition like

{if $controller == 'checkout' && $ == 'XYZ'  && !empty($user_data.[index of your custom field]) }