Make the field read only automatically

Hi Guys need your expertise again.

I created a custom field with selection of cash and credit .

Is there a way if its credit the payment terms template field will be readable only and cant be change.

Thanks for the support in advance