Clearing input box/fieldsets on browser refresh

Not sure if I’m in the right section so I thought I’d start here…

With the form I’m using, I type my name or email address into the box… then if I change my mind or just space out and no longer wish to enter it – then refresh the browser page, the info is still in the box. I want to clear it.

How’s that done?

My confusion btw is that these are HTML elements. The environment is PHP & I’m pretty sure JavaScript is in the mix with regard to the browser functionality. :blush:

Thanks!

It’s more likely that it’s your web browser that’s remembering some of the information you enter into forms. Look in your browsers settings/preferences because you can often turn this feature off.

Yes, it’s per browser. Once I was testing a form and some browsers reverted selected options in a select dropdown, while others left it.

For the rest, if you have value=“” in your text inputs, supposedly a refresh is supposed to set those values to their original, which in this case would be the empty string, and any checked=“checked” and selected=“selected” buttons would go back to whoever was hardcoded with the check.

But if it’s not your form, and the writer didn’t set default values (it’s suggested that you do), then it’s up to your browser settings.