Hey all!
I’ve written a small script where I’m trying to pull a custom field value from memberstack (which is URL) and then refresh the page to that URL. Sort of like a custom redirect.
Any idea on what could be wrong?
<script>
setTimeout(function() {
memberstack.onReady.then(function(member) {
var customFieldValue = member.customField("tf-poc-1as-url");
if (customFieldValue) {
window.location.href = customFieldValue;
} else {
console.error("Error: tf-poc-1as-url field not found or is empty");
}
});
}, 5000);
</script>
Here is my site Read-Only: Webflow - The Attributes