PricingBlog

Best Way to Implement Series of 'Typeform' like Questions

  • bleach03-1240346895503589417

    bleach

    2 years ago

    hey everyone. i'm trying to ask a user a series of questions using buttons. once the first question is answered, I want to hide everything and show a new question (so that I do not have to load a new page). I am currently doing this by stuffing each 'question'(buttons, headers, background, divs) into a component and hiding the component when one of the buttons is pressed. does this make sense? or is there an easier way to do this? i've attached some images as reference
    1240346895763902515-Screenshot_2024-05-15_at_12.55.12_PM.png
    1240346896132866048-Screenshot_2024-05-15_at_12.55.25_PM.png
  • lucasg-1240366626617036800

    Lucas G

    1 year ago

    It makes sense, yes
  • lucasg-1240366936538353846

    Lucas G

    1 year ago

    A mix of show/hide conditions and use of attributes
  • I made a typeform clone which uses an array which dictates what the component shows