public function populateFromSources(SS_HTTPRequest $request = null, Member $member = null, array $required = null) {
		$dataPath = "FormInfo.{$this->FormName()}.data";
		if(isset($member)) {
			$this->loadDataFrom($member);
		}
		else if(isset($request)) {
			$this->loadDataFrom($request->postVars());
		}
		// Hacky again :(
		else if(Session::get($dataPath)) {
			$this->loadDataFrom(Session::get($dataPath));
		}
		else if($failover = $this->getSessionData()) {
			$this->loadDataFrom($failover);
		}
		if(!empty($required)) {
			$this->setRequiredFields($required);
		}
		return $this;
	}
public function populateFromSources(SS_HTTPRequest $request = null, Member $member = null, array $required = null) {
		$dataPath = "FormInfo.{$this->FormName()}.data";
		if(isset($member)) {
			$this->loadDataFrom($member);
		}
		else if(isset($request)) {
			$this->loadDataFrom($request->postVars());
		}
		// Hacky again :(
		else if(Session::get($dataPath)) {
			$this->loadDataFrom(Session::get($dataPath));
		}
		else if($failover = $this->getSessionData()) {
			$this->loadDataFrom($failover);
		}
		if(!empty($required)) {
			$this->setRequiredFields($required);
		}
		return $this;
	}
public function populateFromSources ( SS_HTTPRequest $ request = null , Member $ member = null , array $ required = null ) { $ dataPath = "FormInfo.{$this->FormName()}.data" ; if ( isset ( $ member ) ) { $ this -> loadDataFrom ( $ member ) ; } else if ( isset ( $ request ) ) { $ this -> loadDataFrom ( $ request -> postVars ( ) ) ; } // Hacky again :( else if ( Session :: get ( $ dataPath ) ) { $ this -> loadDataFrom ( Session :: get ( $ dataPath ) ) ; } else if ( $ failover = $ this -> getSessionData ( ) ) { $ this -> loadDataFrom ( $ failover ) ; } if ( ! empty ( $ required ) ) { $ this -> setRequiredFields ( $ required ) ; } return $ this ; }
Populates the form somewhat intelligently
@param SS_HTTPRequest $request Any request
@param Member $member Any member
@param array $required Any validation messages
@return $this
Populates the form somewhat intelligently