I would like to create a form that changes dynamically.
I have a form for creating a project (with fields such as: project_name, project_description ...), and the project can have any amount (greater than or equal to 0) of categories.
I want to display a button that will give the user the opportunity to add another category field. In addition, I would also like the option for category fields to be βdeletedβ by the user (if he changes his mind or makes a mistake). What would be the best way to do this. I would like to use a solution like Ajax.
My solution so far is to leave an empty div under the last category and by clicking a button load another field into that div with another div to be used for the next div. Not happy with this decision, since now I have to calculate how many fields I have and give each div its own identifier, which further complicates this issue.
Is there a simpler solution?
Nayish
source share