Videos
What Is a Popup Form?
How Do You Create a Popup Form?
How Do You Create a Popup Form in WordPress?
Hey everyone, I'm creating my very first CRUD app! HTML, CSS, JS and Express with ejs.
I want to create a popup login/sign up form, similar to the one on Twitter, and I was wondering what the best way to go about this was:
Shall I write all the html, hide it and add an event to the button which toggles the class that makes the overlay and form appear? Or
Just write the container in html, and add an event to the button which fires a function that creates all the elements and appends them? (no inner html)
I was considering the second option, because this form is going to be in different places (home page CTA, show page and index page of someone isn't signed in, etc), so I was thinking that having a function build it out would be more functional (pun not intended) but I've been hearing that using js to create html should be kept to a bare minimum, so I'm curious to hear some more expert opinions.