Is there any option to set autocomplete="off" for the entire form or individual fields? I need to prevent the browser from filling in fields with cached values instead of previously saved values if the user refreshes the page. I know it can be done via Javascript, but setting it in the form's HTML would be better.
Unfortunately, using Javascript doesn't seem to work, because the browser fills in the form fields before the Javascript is run.
In case anyone else needs to do this, the solution is to add a hidden field with the id "autocomplete" and value "off" as the first field on the form. It has to be the first form field, though. You will also want to add 'save_field' => 'false' to prevent the field from being saved in the database.
Nope, scratch that. I thought it was working, but it doesn't because the first form field is a hidden field created by Meta Box. There's no way to add a field before it.
I guess I'll have to edit the Meta Box source code (Form.php) and just remember to edit it every time I update Meta Box (or just not update Meta Box unless it's a critical update). That seems to be the only way to prevent the browser from filling in form values with cached data.