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.

Archive /

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

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

Start-Recipe Form Tutorial Does Not Work


Reply


2 Posts   1887 Views

Avatar
PassePartout

Community Member, 21 Posts

4 July 2008 at 3:14am

Hello,

So I'm trying to create a registration page and was following the [url=http://doc.silverstripe.com/doku.php?id=recipes:forms]start-recipe tutorial[/url]. To start things off beginning at "Start by creating a page called Registration.php". If you follow the instructions you get an error when trying to build. I have tried a couple ways to resolve this issue as you will see in the [url=http://doc.silverstripe.com/doku.php?id=recipes:forms&disqus_reply=807120#comment-807120]comments section[/url] on that tutorial page. I may have just been avoiding the true error as I seem to just be changing what error I get and where. If somebody could look into this or try out the code and get it to work let me know,

cheers

Avatar
PassePartout

Community Member, 21 Posts

4 July 2008 at 3:54am

I have done a few changes but here are my files ( [url=http://pastebin.com/m65dfcfef]Registration.php[/url] and [url=http://pastebin.com/m13dbbfd0]RegistrationsDataObject.php[/url]. As the comments say, I had a few errors which I tried to address.

The first was "Parse error: syntax error, unexpected T_PRIVATE in *****/mysite/code/Registration.php on line 71" which was fixed by taking away the "}" on line 68 and putting it at the end of the page.

This made another error appear "Error in Ajax evaluator on line 974: missing ; before statement
Parse error: syntax error, unexpected $end in *****/mysite/code/Registration.php on line 136" which was fixed by removing the following code

function extraJs() {
$v =
<<<JS
/* ALL YOUR JAVASCRIPT TRICKS HERE */

JS;
return $v;
}

However now i get another problem when I go in the CMS and on the Registration page type I created, under the "registrations" tab, when i go to "add registrations data object" I get this error... "Data-integrity is broken in TariffsDataObject"