2amigos / yiiwheels

Widget extension library for the YiiStrap extension
http://yiiwheels.2amigos.us
Other
133 stars 77 forks source link

Ace editor dont't send edited text #91

Closed iamsalnikov closed 10 years ago

iamsalnikov commented 10 years ago

Hi!

I'm trying to edit html field of my model by yiiwheels.widgets.ace.WhAceEditor widget; But in $_POSTdata i have empty $_POST['Page']['html'] string;

View code:

$this->widget('yiiwheels.widgets.ace.WhAceEditor', array(
     'model' => $page,
     'attribute' => 'html',
     'mode' => 'php',
     'htmlOptions'=> array('class' => 'span8', 'style' => 'height:150px;')
));

Controller action with dump $_POST (Form is sent here):

public function actionSavePage() 
{
    if (!empty($_POST['Page'])) {
        CVarDumper::dump($_POST['Page'], 10, true); die;
    }
    // ...
}

Output, when form sended:

    array
    (
        'title' => 'test page' //ok
        'code' => 'test-code' // ok
        'html' => '' // bad. I input '<div>test</div>'
    );

Where is wrong?