[TYPO3-project-formidable] using $this->oMajixEvent->getParam('value') inside SEARCHFORM

Thomas Meixner tom.meixner at gmail.com
Fri Jan 22 02:10:57 CET 2010


Thank you so much Jérôme, the examples solved my problem.
I pasted below my final code for reference.

I also didn't know about addBlank="blank line". This is a great time and 
space saver in applications I wish I knew before. Is there a way to 
submit this to the Reference Manual?

http://formidable.typo3.ug/reference/elements/renderletlistbox.html

I already updated the wiki but I think the manual is used more often.

Regards,
Thomas

<renderlet:SEARCHFORM name="detailedSearch">
	<datasource use="jobs" />
	<childs>
		<!-- list mrc -->
		<renderlet:LISTBOX name="listmrc" label="MRC" addBlank="--Selectionez 
MRC--">
			<search onfields="tx_dmmjobcontrol_job.mrc" />
			<onchange runat="ajax" syncValue="true" cache="false">
				<userobj>
					<php><![CDATA[/*<?php*/

return $this->rdt("detailedSearch.listmrc")->majixRepaintDependancies();

					/*?>*/]]>
					</php>
				</userobj>
			</onchange>
			<data>
				<userobj>
					<php><![CDATA[

return $GLOBALS["TYPO3_DB"]->exec_SELECTgetRows("uid as value, name as
				caption", "tx_dmmjobcontrol_mrc", "","name","");

					]]></php>
				</userobj>
			</data>
		</renderlet:LISTBOX>
		<!-- list city -->
		<renderlet:LISTBOX name="listcity" label="ville" 
addBlank="--Selectionez ville --" dependsOn="detailedSearch.listmrc" 
hideIfDependancyEmpty="true">
			<search onfields="tx_dmmjobcontrol_job.city" />
			<onchange runat="ajax" syncValue="true" cache="false">
				<userobj>
					<php><![CDATA[
return $this->rdt("detailedSearch.listcity")->majixRepaintDependancies();

					]]></php>
				</userobj>
			</onchange>
			<data>
				<userobj>
					<php><![CDATA[

$sValue = $this->rdt("detailedSearch.listmrc")->getValue();

$where .= "mrc = '".$sValue."'";

return $GLOBALS["TYPO3_DB"]->exec_SELECTgetRows("uid as value, name as 
caption","tx_dmmjobcontrol_city",$where,"name","");


					]]></php>
				</userobj>
			</data>
		</renderlet:LISTBOX>
		
		<!-- Submit Button -->
		<renderlet:SUBMIT label="Afficher offres" mode="search" />
	</childs>
</renderlet:SEARCHFORM>


More information about the TYPO3-project-formidable mailing list