if you want to open your embedded typeform automatically, you can achieve this via Advanced Embed Options (Custom Launch Options → On Page Load). Alternatively the embed SDK has Custom Launch Options feature as well.
However if you want to open this only for specific URLs, you will need to implement this yourself via custom JavaScript code. Something like this:
<!-- button to open the slider manually --><buttonid="slider-link">open slider</button><!-- include embed lib JS and CSS --><scriptsrc="//embed.typeform.com/next/embed.js"></script><linkrel="stylesheet"href="//embed.typeform.com/next/css/slider.css" /><!-- custom logic below --><script>// create typeform slider embedconst mySlider = window.tf.createSlider('oWPUHPmF')
// attach 'open' function to button click to open the slider manually
document.querySelector('#slider-link').onclick = mySlider.open
// check URL query parameters if the slider should open automatically on page loadconst autoOpenSlider = window.location.search.includes('auto-open-slider-true')
if (autoOpenSlider) {
mySlider.open() // open automatically
}
</script>
if you want to open your embedded typeform automatically, you can achieve this via Advanced Embed Options (Custom Launch Options → On Page Load). Alternatively the embed SDK has Custom Launch Options feature as well.
However if you want to open this only for specific URLs, you will need to implement this yourself via custom JavaScript code. Something like this:
<!-- button to open the slider manually --><buttonid="slider-link">open slider</button><!-- include embed lib JS and CSS --><scriptsrc="//embed.typeform.com/next/embed.js"></script><linkrel="stylesheet"href="//embed.typeform.com/next/css/slider.css" /><!-- custom logic below --><script>// create typeform slider embedconst mySlider = window.tf.createSlider('oWPUHPmF')
// attach 'open' function to button click to open the slider manually
document.querySelector('#slider-link').onclick = mySlider.open
// check URL query parameters if the slider should open automatically on page loadconst autoOpenSlider = window.location.search.includes('auto-open-slider-true')
if (autoOpenSlider) {
mySlider.open() // open automatically
}
</script>