chang div visibility based on database results
===

Hello i need to change div visibility based on database results in coldfusion.for example when i chosse category 1 and push add button only some of inputs to appear based on what i want to introduce in database for that category.If i choose category 2 other input fields to appear.
field inputs are different types like dropdown,text-box,check-box etc... 

Could you give me any idea of how to do this i think about something like making all input i need for all my categories and putting them in a div and make not visible and then change the visibility only for div i need based on what i need to introduce?