如何让用户连续创建相同的HTML表单,但是针对不同的事件?

Hopefully I can get my point across.

I am just trying to figure out the best way to let user's of the site create forms as they wish.

The good thing is that the form will always have the same fields and the only thing that needs to change are the event name that the form is being used for but that can easily just be stored in the database.

The thing I am confused about is how to have a section in an admin area that the user fills out the name and sets the form to be visible and the form is then shown on the homepage.

I am racking my brains as to where the form 'template' will be held since the only solution I can think of at the moment is to just store the entire html form data as a blob in the database along with the event name and it's visibility status but I still don't know where the original form data will be that will insert into the database each time a form is created.

Hopefully that makes some sense, any guidance would be appreciated.

I have just had one idea to store the form data in an external php file and include it in the page if any forms are set to visible but I'd still like to know how others would approach this.

So, its really just one page with variable values for some of the form attributes. Create the form as its own file, include it on the pages where its needed, and set the values for the variable form attributes in the including page.

The variable attribute values can be stored in the DB, and users can use a separate form to "create" their own form. All you're doing is just storing the attribute values for use when the form is viewed.

Any default form field data can also be stored in the DB, or in the page itself.