简体   繁体   中英

How do you make a form in Sitecore 6?

Most CMS' have a way to create forms for users or anonymous users to fill out. Is there a mechanism for creating forms like this in Sitecore 6?

As far as I can tell, the only way to make forms like this would be to manually create them in a sub-layout (user control), and then add that sub-layout to a page. Does anyone know a better way?

It depends on who you want creating the forms.

If you want content authors or admins to be able to use a wysiwyg-like interface for creating and updating forms, then I would recommend using the Web Forms for Marketers Module that is available for Sitecore. While certainly not the panacea for allowing content authors to create forms, it is pretty robust and also very extensible.

However, if it will primarily be developers creating and maintaining the forms, then it will probably be easier for you to go with the sublayout approach.

To ctford's point, the Web Forms for Marketers Module does use it's own database for form data storage, not the typical Sitecore content databases. And you'd probably want to do something similar for your forms as well, rather than writing data back into Sitecore. But that will depend on your business requirements.

Your UserControl suggestion is the way I would do it.

Sitecore, like other CMSes (such as RedDot), has a disconnected publishing model. Content is populated in a separate editing environment before being pushed to a live environment.

Consequently, the live environment is read-only as far as the CMS is concerned. This disallows native form processing because Sitecore doesn't expect updates to be made to the live database. To store data from anonymous users you would need to create custom database tables outside the control of the CMS.

As far as I know, there is no forms API comparable to Drupal's .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM