i want to create a form where user have two option for image upload , either they upload a image through a file upload option or they can input text URL of the image, the problem is that how can restrict a user to either of the one option, i though RADIO checked might help me but i didn't figure out how to use radio button to enable any of the one option, kindly help me in this, i am new in development and didn't have much knowledge of JavaScript as well.
<input name="file" type="radio" value="file" checked><input type="file" name="file">
<input name="file" type="radio" value="url" checked><input type="text" name="url" >