Our great sponsors
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
If you're creating something more complex and want quite a bit of dynamic content, you should consider React or Vue. The learning curve on those is much greater, but you can build much more complex websites and apps.
If you're creating something more complex and want quite a bit of dynamic content, you should consider React or Vue. The learning curve on those is much greater, but you can build much more complex websites and apps.
If you only want a very small amount of dynamic content like this, jQuery is probably your best bet. The basic idea would be that you create all of the different flavors of form in your HTML and when the user clicks on one of the buttons, you modify the CSS display property to only show the correct form and hide the others. In jQuery, you'd call the hide and show methods to do that.