Question

Button disappear on click

  • 7 September 2022
  • 1 reply
  • 32 views

Badge

Is there a way to display different text on a button upon clicking? 

Or disappear on clicking (to reveal altered text underneath)?

I have a button that reveals a section once clicked from “ + “ state, and I’d like the button text to say “ - “ when the section is revealed. 

https://discover.getdbt.com/dbt-101-thank-you/

Thanks in advance!


1 reply

Userlevel 4
Badge

Hi @parkmyvan ,

 

Whilst you are able to alter the button styles (colour, border etc.) natively in the builder, there’s no simple way to change the button text. To achieve that, you’d need to use some custom code to your page. This is a little outside the scope of my ability, although I did find this webpage showing you how this could be achieved using some Javascript.

 

Sorry I couldn’t be of more help with this, but I hope the above link can assist you in achieving your goal.

Reply