public function __remoteFormFor($name, $url, $id = 'remote_form', $collection = array(), $options = array()) { $this->id = $id; $this->name = $name; $options = array_merge(array('id' => $id, 'method' => 'post', 'action' => $url, 'onsubmit' => "new Ajax.Request('" . $url . "',{asynchronous:true, evalScripts:true, parameters:Form.serialize(this)}); return false;")); $this->out = FormTagHelper::tag('form', $options, true) . "\n"; return $this; }