From b5a7be608229bd0a56e1a9291132263780e9ca20 Mon Sep 17 00:00:00 2001 From: sanjay Date: Mon, 26 May 2014 14:27:44 +0530 Subject: [PATCH] Update simple-contact-form.md corrects the description about the order of the arguments passed while creating Form object. --- docs/en/howto/simple-contact-form.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/en/howto/simple-contact-form.md b/docs/en/howto/simple-contact-form.md index f77fb1b5d..9b1c5a060 100644 --- a/docs/en/howto/simple-contact-form.md +++ b/docs/en/howto/simple-contact-form.md @@ -46,7 +46,8 @@ We then create a `[api:FieldList]` of the form actions, or the buttons that subm :::php return new Form($this, 'Form', $fields, $actions); -Finally we create the `Form` object and return it. The first argument is the name of the form – this has to be the same as the name of the function that creates the form, so we've used 'Form'. The second argument is the controller that the form is on – this is almost always $this. The third and fourth arguments are the fields and actions we created earlier. +Finally we create the `Form` object and return it. The first argument is the controller that the form is on – this is almost always $this. The second argument is the name of the form – this has to be the same as the name of the function that creates the form, so we've used 'Form'. The third and fourth arguments are the fields and actions we created earlier. + To show the form on the page, we need to render it in our template. We do this by appending $ to the name of the form – so for the form we just created we need to add $Form. Add $Form to the themes/currenttheme/Layout/Page.ss template, below $Content.