Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
9637fa1d
Commit
9637fa1d
authored
Jun 23, 2014
by
Carsten Brandt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added note about resubmitting forms
thanks to @Ragazzo fixes #3799
parent
d94dc6a1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
start-forms.md
docs/guide/start-forms.md
+4
-1
No files found.
docs/guide/start-forms.md
View file @
9637fa1d
...
...
@@ -118,7 +118,7 @@ If the model is successfully populated (i.e., if the user has submitted the HTML
[
[yii\base\Model::validate()|validate()
]
] to make sure the values entered are valid.
If everything is fine, the action will render a view named
`entry-confirm`
to confirm the data entered
with the user that the data entered. If
a problem occurred
, the
`entry`
view will
with the user that the data entered. If
no data was submitted or the data contained errors
, the
`entry`
view will
be rendered, wherein the HTML form will be shown, along with any validation error messages.
> Info: The expression `Yii::$app` represents the [application](structure-applications.md) instance,
...
...
@@ -126,6 +126,9 @@ be rendered, wherein the HTML form will be shown, along with any validation err
provides components such as
`request`
,
`response`
,
`db`
, etc. to support specific functionality.
In the above code, the
`request`
component of the application instance is used to access the
`$_POST`
data.
> Note: In this very simple example we just render the confirmation page, however when you process POST data you
should better use
[
[yii\web\Controller::refresh()|refresh()
]
] or
[
[yii\web\Controller::redirect()|redirect()
]
]
to avoid
[
resubmitting
](
http://en.wikipedia.org/wiki/Post/Redirect/Get
)
forms.
Creating Views <a name="creating-views"></a>
--------------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment