Ignore buttons when making query parameter for form

This commit is contained in:
Martchus 2024-03-14 00:43:12 +01:00
parent 85ccd68f07
commit 2f4f4ffa5c
1 changed files with 1 additions and 1 deletions

View File

@ -90,7 +90,7 @@ function makeFormQueryParameter(form)
continue; // if we disable a form element or hide it via CSS we also don't want to submit its data
}
const type = formElement.type;
if ((type === 'checkbox' || type === 'radio') && !formElement.checked) {
if ((type === 'button') || ((type === 'checkbox' || type === 'radio') && !formElement.checked)) {
continue;
}
const name = formElement.name;