[TYPO3-mvc] How to use partial validation for a multi-step form

Sebastian Felix Schwarz schwarz at takomat.com
Tue May 31 11:06:49 CEST 2011


Has nobody any ideas ?? 

these vars are rendered in the showstep1Action

but they are formfields from showstep2 ... but required vars in the domain model ... 
> === FE RENDERING ===
> 
> firma: The given subject was NULL. (#1221560910)
> 
> vorname: The given subject was NULL. (#1221560910)
> 
> name: The given subject was NULL. (#1221560910)
> 
> strasse: The given subject was NULL. (#1221560910)
> 
> hausnummer: The given subject was NULL. (#1221560910)
> 
> plz: The given subject was NULL. (#1221560910)
> 
> ort: The given subject was NULL. (#1221560910)
> 
> Email: Keine gültige Email Adresse.
> 
> telefon: The given subject was NULL. (#1221560910)
> 
> === / FE RENDERING ===



Am 30.05.2011 um 20:19 schrieb Sebastian Felix Schwarz:

> Hi List, 
> 
> i found Sebastian's Kurführst Wiki-Article about Multi-Step-Forms in the T3-Forge Rep.
> I hope i included all things correctly, but it doesnt work ... 
> 
> First of all, i call in my Template: Showstep1.html the action="savestep1" by submitting the button.
> But i getting the error-fields of the required-form-fields from step 2 : 
> 
> === FE RENDERING ===
> 
> firma: The given subject was NULL. (#1221560910)
> 
> vorname: The given subject was NULL. (#1221560910)
> 
> name: The given subject was NULL. (#1221560910)
> 
> strasse: The given subject was NULL. (#1221560910)
> 
> hausnummer: The given subject was NULL. (#1221560910)
> 
> plz: The given subject was NULL. (#1221560910)
> 
> ort: The given subject was NULL. (#1221560910)
> 
> Email: Keine gültige Email Adresse.
> 
> telefon: The given subject was NULL. (#1221560910)
> 
> === / FE RENDERING ===
> 
> Here are some Code Snippets:
> 
> /**
> 	 * Displays a form for creating a new  DomainPackage (step1)
> 	 *
> 	 * @param Tx_Dpregistry_Domain_Model_DomainPackage $newDomainPackage a fresh DomainPackage object which has not yet been added to the repository
> 	 * @return void
> 	 * @dontvalidate $newDomainPackage
> 	 */
> 	public function showstep1Action  (Tx_Dpregistry_Domain_Model_DomainPackage $newDomainPackage = NULL) {
> 		$this->view->assign('newDomainPackage', $newDomainPackage);
> 	}
> 	
> 	
> 	public function initializeSavestep1Action(){
> 		$this->registerPartialValidatorForArgument('domainname');
> 		$this->registerPartialValidatorForArgument('endungDe');
> 		$this->registerPartialValidatorForArgument('endungCom');
> 		$this->registerPartialValidatorForArgument('spaeterReg');
> 		$this->registerPartialValidatorForArgument('paketname');
> 	
> 	}
> 	
> 	public function savestep1Action (Tx_Dpregistry_Domain_Model_DomainPackage $newDomainPackage){
> 		$this->redirect('showstep2Action');
> 	}
> 	
> 	/**
> 	 * Displays a form for step2
> 	 *
> 	 * @param Tx_Dpregistry_Domain_Model_DomainPackage $newDomainPackage a fresh DomainPackage object which has not yet been added to the repository
> 	 * @return void
> 	 * @dontvalidate $newDomainPackage
> 	 */
> 	public function showstep2Action  (Tx_Dpregistry_Domain_Model_DomainPackage $newDomainPackage) {
> 		$this->view->assign('newDomainPackage', $newDomainPackage);
> 	}
> 	
> 	public function initializeSavestep2Action(){
> 		$this->registerPartialValidatorForArgument('firma');
> 		$this->registerPartialValidatorForArgument('ekpNummer');
> 		$this->registerPartialValidatorForArgument('handelsregisternummer');
> 		$this->registerPartialValidatorForArgument('anrede');
> 		$this->registerPartialValidatorForArgument('titel');
> 		[... AND SO ON ...]
> 	
> 	}
> 	
> 	public function savestep2Action (Tx_Dpregistry_Domain_Model_DomainPackage $newDomainPackage){
> 		$this->domainPackageRepository->add($newDomainPackage);
> 		$this->flashMessageContainer->add('Your new DomainPackage was created.');
> 		$this->redirect('list');
> 	}
> 
> Perhaps you have some Tips.... I'm a noob in Extbase and Fluid ... 
> 
> The Plugin-Page isn't cached ... 
> And also in my localconf-php i added the save and show-Actions to the no-cache-Array
> Hope Somebody can help me.
> 
> Tanks.
> 
> Best Regards Sebastian Felix Schwarz
> 
> 
> ....................................................................
> Sebastian Felix Schwarz
> Leiter Multimedia Produktion
> 
> takomat GbR | Neptunplatz 6b | 50823 Köln
> 
> E-mail: schwarz at takomat.com
> Online: http://www.takomat.com
> 
> Tel: +49 (0)221 - 75905-03
> Fax: +49 (0)221 - 75904-02
> ....................................................................
> 
> takomat GbR, Inh.: Johne, Schwarz, Buller u. Jakubowski
> Sparkasse Köln-Bonn: BLZ 370 501 98 – Kto. 190 144 7076, 
> Steuernummer: DE 258/513/199, Erfüllungsort und Gerichtsstand ist Köln. Sitz der Gesellschaft ist Köln.
> 
> Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet.
> 
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc

....................................................................
Sebastian Felix Schwarz
Leiter Multimedia Produktion

takomat GbR | Neptunplatz 6b | 50823 Köln

E-mail: schwarz at takomat.com
Online: http://www.takomat.com

Tel: +49 (0)221 - 75905-03
Fax: +49 (0)221 - 75904-02
....................................................................

takomat GbR, Inh.: Johne, Schwarz, Buller u. Jakubowski
Sparkasse Köln-Bonn: BLZ 370 501 98 – Kto. 190 144 7076, 
Steuernummer: DE 258/513/199, Erfüllungsort und Gerichtsstand ist Köln. Sitz der Gesellschaft ist Köln.

Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet.



More information about the TYPO3-project-typo3v4mvc mailing list