HIT FOR HIT BATTLES™
Your Music.
Your Battle.
We're building Hit For Hit around the people actually making music.
Tell us what works, what doesn't, what you're missing, and what would
make you want to step into the battle.
This isn't a fan survey.
We want the real answer. If something about the music business,
artist development, promotion, performance, booking, battles,
networking, or technology frustrates you — tell us.
Your answers help us build better experiences and better opportunities.
HIT FOR HIT BATTLES™
Powered by STV Radiomeltdown
/* ---------------- DOWNLOAD ---------------- */
downloadBtn.addEventListener("click", () => {
const data = collectData();
const response =
buildResponse(data);
const blob =
new Blob(
[response],
{ type: "text/plain;charset=utf-8" }
);
const url =
URL.createObjectURL(blob);
const a =
document.createElement("a");
const safeName =
(data.name || "hit-for-hit-response")
.replace(/[^a-z0-9]/gi, "-")
.toLowerCase();
a.href = url;
a.download =
`hit-for-hit-${safeName}.txt`;
document.body.appendChild(a);
a.click();
a.remove();
URL.revokeObjectURL(url);
});
/* ---------------- AUTO SAVE ---------------- */
const STORAGE_KEY =
"hit_for_hit_questionnaire";
function saveProgress() {
const formData =
new FormData(form);
const saved = {};
for (const [key, value] of formData.entries()) {
if (saved[key]) {
if (!Array.isArray(saved[key])) {
saved[key] = [saved[key]];
}
saved[key].push(value);
} else {
saved[key] = value;
}
}
localStorage.setItem(
STORAGE_KEY,
JSON.stringify(saved)
);
}
function restoreProgress() {
const saved =
localStorage.getItem(STORAGE_KEY);
if (!saved) return;
try {
const data =
JSON.parse(saved);
Object.entries(data).forEach(
([name, value]) => {
const values =
Array.isArray(value)
? value
: [value];
values.forEach(item => {
const fields =
form.querySelectorAll(
`[name="${name}"]`
);
fields.forEach(field => {
if (
field.type === "checkbox" ||
field.type === "radio"
) {
if (field.value === item) {
field.checked = true;
}
} else {
field.value = item;
}
});
});
}
);
} catch (error) {
console.warn(
"Could not restore saved questionnaire.",
error
);
}
}
form.addEventListener(
"input",
saveProgress
);
form.addEventListener(
"change",
saveProgress
);
/* ---------------- INITIALIZE ---------------- */
restoreProgress();
showSection(1);