v0.1

Campos personalizados
#99 - Entradas de archivos personalizadas
Convierta cualquier cosa en un archivo de entrada
Rellene fácilmente las entradas utilizando parámetros URL.
Watch the video for step-by-step implementation instructions
<!-- 💙 MEMBERSCRIPT #67 v0.1 💙 PREFILL INPUTS WITH URL PARAMETERS -->
<script>
// Function to get URL parameters
function getURLParams() {
const urlParams = new URLSearchParams(window.location.search);
return Object.fromEntries(urlParams.entries());
}
// Function to prefill inputs based on URL parameters
function prefillInputs() {
const urlParams = getURLParams();
const inputElements = document.querySelectorAll('[ms-code-prefill-param]');
inputElements.forEach((inputElement) => {
const paramKey = inputElement.getAttribute('ms-code-prefill-param');
if (paramKey && urlParams[paramKey]) {
inputElement.value = urlParams[paramKey];
}
});
}
// Call the keywordfunction to prefill inputs when the page loads
prefillInputs();
</script>More scripts in Marketing