[TYPO3-project-formidable] Get values from FORMidable renderlets
Manuel Rego Casasnovas
mrego at igalia.com
Fri May 18 17:54:24 CEST 2007
Hi Jerome,
I've been using a similar solution:
$this->oDataHandler->__aFormData['country'];
But I your solution is smarter:
$this->oDataHandler->_getThisFormData("country")
Thank you very much,
Rego
--
http://www.igalia.com
El vie, 18-05-2007 a las 18:08 +0300, Jerome Schneider escribió:
> Hey !
>
> I understand now way better thanks to the country example
>
> Try something like this:
>
>
> <renderlet:LISTBOX name="country">
> <onchange refresh="true" />
> <data defaultvalue="840"> <!-- default: USA -->
> <userobj>
> <php><![CDATA[
>
> return $GLOBALS["TYPO3_DB"]->exec_SELECTgetRows(
> "cn_iso_nr as value, cn_official_name_en as caption",
> "static_countries",
> "",
> "",
> "caption ASC"
> );
> ]]></php>
> </userobj>
> </data>
> </renderlet:LISTBOX>
>
> <renderlet:LISTBOX name="country_zone">
> <data>
> <userobj>
> <php><![CDATA[
>
> $iCountryValue = $this->oDataHandler->_getThisFormData("country");
>
> if(intval($iCountryValue) > 0) {
>
> return $GLOBALS["TYPO3_DB"]->exec_SELECTgetRows(
> "uid as value, zn_name_local as caption",
> "static_country_zones",
> "zn_country_iso_nr='" . $iCountryValue . "'",
> "",
> "caption ASC"
> );
> }
>
> ]]></php>
> </userobj>
> </data>
> </renderlet:LISTBOX>
>
>
>
> The important part is the $this->oDataHandler->_getThisFormData("country")
>
>
> Hope you'll find this helpful,
> Jerome Schneider
>
>
> Manuel Rego Casasnovas a écrit :
> > Hello Jerome!
> >
> > I want to use the value of one renderlet in another renderlet.
> >
> > In the previous example, I want to use the uid for each row to create
> > the radiobutton with the uid of this row.
> > I want to create a list of records (from a database table) and a radio
> > button, that allow to the user choose one of these record.
> > I think that my example is bad.
> >
> > I'm going to try explain better my problem.
> > For example I've a renderlet LISTBOX with the countries from
> > static_countries, and the user select one country.
> > <renderlet:LISTBOX name="country">
> > <data>
> > <userobj>
> > <extension>this</extension>
> > <method>getCountries</method>
> > </userobj>
> > </data>
> > </renderlet:LISTBOX>
> >
> > Then I refresh the form and I want to know the country selected by the
> > user for another renderlert LISTBOX with the country zones for this
> > country.
> > I'd like to can get the country select for the user and use this value
> > in another renderlet.
> > <renderlet:LISTBOX name="country_zone">
> > <data>
> > <userobj>
> > <extension>this</extension>
> > <method>getCountryZones</method>
> > <params>
> > <param>
> > <name>country</name>
> > <value>$renderlet:country</value>
> > |--> the value from renderlet country
> > <param>
> > </params>
> > </userobj>
> > </data>
> > </renderlet:LISTBOX>
> >
> > I hope I explain better mi idea. It's only an idea and perhaps can be a
> > bad or not correct idea.
> >
> > Bye ;-)
> > Rego
> >
> > --
> > http://www.igalia.com
> >
> >
> > El vie, 18-05-2007 a las 15:11 +0300, Jerome Schneider escribió:
> >> Hello :)
> >>
> >> I'm not sure to understand your question, could you give little more
> >> details please ?
> >>
> >> Jerome
> >>
> >> Manuel Rego Casasnovas a écrit :
> >>> Hello.
> >>>
> >>> I have a question about FORMidable.
> >>> Sometimes I need to use some values from other renderlets in one renderlet.
> >>>
> >>> For example I've a list like the next:
> >>> 1 - Test1 - RADIOBUTTON
> >>> 2 - Test2 - RADIOBUTTON
> >>> 3 - Test3 - RADIOBUTTON
> >>> And I'd like to know the uid value in the renderlet RADIOBUTTON to do
> >>> something like:
> >>> <input type="RADIO" name="my_name" value="###uid###"/>
> >>> Where ###uid### have the appropriate value for each row.
> >>>
> >>> I don't know if this is or isn't possible.
> >>>
> >>>
> >>> Thanks for your time,
> >>> Rego
> >>>
> >>> --
> >>> http://www.igalia.com
> >> _______________________________________________
> >> TYPO3-project-formidable mailing list
> >> TYPO3-project-formidable at lists.netfielders.de
> >> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-project-formidable
> _______________________________________________
> TYPO3-project-formidable mailing list
> TYPO3-project-formidable at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-project-formidable
More information about the TYPO3-project-formidable
mailing list