選択した schoolFilter フォームの値を取得し、[SELECTED VALUE HERE] に配置したいと考えています。
$data = $this->Js->get('#SchoolFilter')->serializeForm(array('isForm' => true, 'inline' => true));
$this->Js->get('#SchoolSchoolId')->event(
'change', $this->Js->request(
array('action' => 'assign_school_ads/', [SELECTED VALUE HERE], array(
'update' => '#results',
'data' => $data,
'async' => true,
'dataExpression' => true,
'method' => 'POST'
)
)
);
// School Filter
$schoolFilter = $this->Form->create('School', array('id' => 'SchoolFilter');
$schoolFilter .= $this->Form->input('school_id', array('label'=>'Schools', 'empty'=>'- select -');
$schoolFilter .= $this->Form->end();
この質問のバリエーションを見てきましたが、JS Helper の使用を忘れていることを除いて、明確な答えはありません。JS Helper のコンテキスト内で可能ですか? そうでない場合は、通常の JQuery を使用して値を取得し、それを JS Helper に挿入できますか。