Answered

Custome button to launch TypeForm as slider

  • 15 February 2022
  • 3 replies
  • 358 views

I have a designed website with some buttons, which I want to use to lanuch TypeForm as a slider.

The embed code already includes rthe button design, but I want to keep my button.

Is there a URL or something I can allocate to existing buttons so the form opens as a slider?

Or do I need to recreate the design? In that case, how can I create a gradient button in TypeForm embed customizations?

icon

Best answer by mathio 15 February 2022, 16:07

View original

3 replies

Userlevel 7
Badge +5

Hello @Adidacta 

have a look at our embed SDK readme file. You can add functionality to open a slider to any of your existing buttons.

Your code should look something like this:

<button id="button">my button with gradient</button>
<script src="//embed.typeform.com/next/embed.js"></script>
<link rel="stylesheet" href="//embed.typeform.com/next/css/slider.css" />
<script>
const { toggle } = window.tf.createSlider('oWPUHPmF')
document.querySelector('#button').onclick = toggle
</script>

You can preview this here: https://glitch.com/edit/#!/exciting-aquamarine-surgeon

Thank you very much.
I’ll have a look

Adi

Userlevel 7
Badge +5

Hi @Adidacta Did this work for you? Let us know how it went!

Reply