Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

Forms and how to integrate them into a Silverstripe


Go to End


2256 Views

Avatar
Nemus

Community Member, 20 Posts

17 November 2006 at 10:22am

Hi people!

I'm having a lot of problems integrating simple form into a page within silverstripe. When i try to create page from admin which uses contactform or newsletter subscription form I get this error:

Warning: Cannot modify header information - headers already sent by (output started at C:\lighttpd\htdocs\cms\code\PageTypes\UserDefinedForm.php:525) in C:\lighttpd\htdocs\sapphire\core\Debug.php on line 118
ERROR:Error 512: None of these templates can be found: SubmittedFormReportField.ss At l53 in C:\lighttpd\htdocs\sapphire\core\SSViewer.php user_error(None of these templates can be found: SubmittedFormReportField.ss,512) user_error at line 53 of SSViewer.php SSViewer->__construct(SubmittedFormReportField) __construct at line 472 of ViewableData.php ViewableData->renderWith(SubmittedFormReportField) renderWith at line 39 of SubmittedFormReportField.php SubmittedFormReportField->Field() Field at line of call_user_method_array(Field,Object,Array) call_user_method_array at line 266 of ViewableData.php ViewableData->XML_val(Field,,1) XML_val at line 28 of .cacheC..lighttpd.htdocs.sapphire.templates.DefaultFieldHolder.ss include(C:\WINDOWS\.cacheC..lighttpd.htdocs.sapphire.templates.DefaultFieldHolder.ss) include at line 164 of SSViewer.php SSViewer->process(Object) process at line 474 of ViewableData.php ViewableData->renderWith(DefaultFieldHolder) renderWith at line 172 of FormField.php FormField->FieldHolder() FieldHolder at line of call_user_method_array(FieldHolder,Object,Array) call_user_method_array at line 266 of ViewableData.php ViewableData->XML_val(FieldHolder,,1) XML_val at line 77 of .cacheC..lighttpd.htdocs.sapphire.templates.TabSetFieldHolder.ss include(C:\WINDOWS\.cacheC..lighttpd.htdocs.sapphire.templates.TabSetFieldHolder.ss) include at line 164 of SSViewer.php SSViewer->process(Object) process at line 474 of ViewableData.php ViewableData->renderWith(TabSetFieldHolder) renderWith at line 37 of TabSet.php TabSet->FieldHolder() FieldHolder at line of call_user_method_array(FieldHolder,Object,Array) call_user_method_array at line 266 of ViewableData.php ViewableData->XML_val(FieldHolder,,1) XML_val at line 52 of .cacheC..lighttpd.htdocs.sapphire.templates.Includes.Form.ss include(C:\WINDOWS\.cacheC..lighttpd.htdocs.sapphire.templates.Includes.Form.ss) include at line 164 of SSViewer.php SSViewer->process(Object) process at line 474 of ViewableData.php ViewableData->renderWith(Form) renderWith at line 464 of Form.php Form->forTemplate() forTemplate at line 275 of ViewableData.php ViewableData->XML_val(EditForm,,1) XML_val at line 200 of .cacheC..lighttpd.htdocs.cms.templates.Includes.CMSMain_right.ss include(C:\WINDOWS\.cacheC..lighttpd.htdocs.cms.templates.Includes.CMSMain_right.ss) include at line 164 of SSViewer.php SSViewer->process(Object) process at line 474 of ViewableData.php ViewableData->renderWith(Array) renderWith at line 220 of LeftAndMain.php LeftAndMain->Right() Right at line 106 of LeftAndMain.php LeftAndMain->getitem(Array) getitem at line 108 of Controller.php Controller->run(Array) run at line 50 of Director.php Director->direct(/admin/getitem) direct at line 86 of main.php

Then I tried adding pagetypes the way suggested in documentation wiki but when I copy paste examples from there silverstripe crashes totally and no page can be served or edited untili delete those pages.

Is is possible that someone from team sets up small how-to which point by point describe all necessary steps to integrate simple form into silverstripe (for instance one that gathers some data and sends it via email).