Skip to content

Commit

Permalink
Changed information about $data['value']
Browse files Browse the repository at this point in the history
  • Loading branch information
moldcraft committed Jan 26, 2015
1 parent eadd44d commit 6f5ec4b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions options/create-option-type.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,8 @@ To define a new option type, create a class that extends the base option type cl
protected function _render($id, $option, $data)
{
/**
* $data['value'] can contain:
* 1. Correct value previously saved in the database (returned by the _get_value_from_input() method)
* 2. Raw value from $_POST. This happens when the form was submitted but the validation failed.
* You decide if it's correct and how to use it in html
* $data['value'] contains correct value returned by the _get_value_from_input()
* You decide how to use it in html
*/
$option['attr']['value'] = (string)$data['value'];
Expand Down

0 comments on commit 6f5ec4b

Please sign in to comment.