XF 2.1 "Other" custom user field option


I wish to have an "Other" option for radio button/checkbox custom user fields on registration and an associated free text entry box. I think this can be achieved by adding a separate custom user field, but ideally it should either not be visible or be empty if Other isn't selected and be mandatory if Other is selected.

Does anyone know how this might be achieved? I'm not sure if a PHP callback can check a different custom field?
Last edited: