Cyberpunk
Cyberpunk
KPCKevin Powell - Community
Created by Cyberpunk on 4/11/2024 in #front-end
Radio buttons selected on page load - unwanted
I have a form with a couple of radio buttons. The form is wrapped within a <dialog> element and will be opened only when a button "Back this project" is clicked. When opened, however, the first radio button is always selected and there should be none selected before a user chooses any. Is this default browser behavior or? Also when the form is closed and re-opened, the previous choice is remembered. How can I deselect all radio buttons once the form is re-opened (I know deleting cache is a bad option therefore wouldn't go for that one) Here's my codepen: https://codepen.io/d8701a/pen/bGJKRWO Thanks!
11 replies