我想获取选定的 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。