Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

25 lines (18 sloc) 0.625 kb
<?php
class page_reloadform extends Page {
public $skip=true;
function init(){
parent::init();
$form1=$this->add('Form');
$selection=$form1->addField('reference','user')->setController('Controller_User');
$form2=$this->add('MVCForm');
$selection->js('change',$form2->js()->reload(array('user_id'=>$selection->js()->val())));
$this->api->stickyGET('user_id');
$form2->setController('Controller_User');
if($_GET['user_id'])$form2->getController()->loadData($_GET['user_id']);
if($form2->isSubmitted()){
$form2->update();
$form2->js()->univ()->alert('Saved successfully')->execute();
}
}
}
Jump to Line
Something went wrong with that request. Please try again.