[TYPO3-formidable] 2.0.421 with 5.3 and editing in Modalbox

Paweł Bandura gawelx at gmail.com
Fri Jan 29 21:27:05 CET 2010


W dniu 2010-01-29 16:54, Oliver Wand pisze:
> 		<renderlet:MODALBOX name="editbox">
> 			<childs>
> 				<renderlet:TEXT name="name" label="Name" />
> 				<renderlet:TEXT name="lc" label="LC" />
> 				<renderlet:BUTTON name="btnCancel" label="Cancel">
> 					<onclick runat="client" exec="cb1.btnCancel_click()" />
> 				</renderlet:BUTTON>
> 				<renderlet:BUTTON name="btnSave" label="Save and close">
> 					<onclick
> 						runat="ajax"
> 						params="editbox.title, editbox.subtitle"
> 						cache="false"
> 						exec="cb1.btnSave_click()"
> 					/>
> 				</renderlet:BUTTON>
> 			</childs>
> 		</renderlet:MODALBOX>
>
> ------------------------------------
>
> <?php
> 	class editmodalbox {
>
> 		function btnSave_click() {
>
> 			// requesting parameters from the event
> 			$aParams = $this->oForm->oMajixEvent->getParams();
>
>                          // update in DB
> 			$GLOBALS["TYPO3_DB"]->exec_UPDATEquery(
> 				"tx_owroyalties_label",
> 				"uid='" . $this->oForm->oSandBox->iRecordUid . "'",
> 				array(
> 					"name" =>  $aParams["editbox.name"],
> 					"lc" =>  $aParams["editbox.lc"],
> 				)
> 			);
>
> 			// close the box, and repaints the list
> 			return array(
> 				$this->oForm->aORenderlets["editbox"]->majixCloseBox(),
> 				$this->oForm->aORenderlets["thelist"]->majixRepaint()
> 			);
> 		}
> 	}
> ?>

Hi

If you want to use name and lc params in the codeBehind function, you 
have to pass them to the function in the onClick event definition.

Regards
Paweł Bandura


More information about the TYPO3-project-formidable mailing list