[Typo3-dev] Typoscript: setup.txt for extension: having two fieldsto wrap? [SOLVED]
Elijah Alcantara
elijah.alcantara at gmail.com
Mon Oct 24 04:00:07 CEST 2005
It worked! Thank you =)
I setup a global variable in the class file and put this in the setup.txt
5 = TEXT
5.field = id
5.dataWrap = <td><div><input type=checkbox
name=tx_spinpreferences_pi1[chkbox_|] {global :
chk_variable}></td></div>
Elijah A.
On 10/22/05, Peter Klein <peter at umloud.dk> wrote:
> Hi Elijah, you could either create a COA object, which can contain several
> objects. But the easiest way would be using "dataWrap" instead of wrap. See
> these pages for more info:
>
> dataWrap
> http://typo3.org/documentation/document-library/doc_core_tsref/stdWrap/
>
> COA objects
> http://typo3.org/documentation/document-library/doc_core_tsref/COBJ_ARRAY_COA_COA/
>
> --
> Peter Klein / Umloud Untd
>
>
> "Elijah Alcantara" <elijah.alcantara at gmail.com> wrote in message
> news:mailman.5349.1129777410.10463.typo3-dev at lists.netfielders.de...
> I've setup an extension for displaying my php form, I've made the code
> to loop some checkboxed contents & used tx_pluginname[chkbox_number]
> as a name to dynamically output something like chkbox_1, chkbox_2, etc
> ...
>
> #this is my setup.txt
> 5 = TEXT
> 5.field = id
> 5.wrap = <td><div><input type=checkbox
> name=tx_spinpreferences_pi1[chkbox_|]></div></td>
>
> My problem is I wanted an extra 5.field with the a value "CHECKED"
> whether if my php script setup a value for it or not, if the listed
> checkbox is supposed to be unchecked then it's value will just be " "
>
> #my php script, inside a loop
> #if statement here....
> #$this->cObj->data[chk_variable] = "CHECKED";
> #else... data[chk_variable] = "";
> #end if statement
>
> So the TEXT should contain something like:
>
> <input type=checkbox name=tx_spinpreferences_pi1[chkbox_1] CHECKED>
> OR
> <input type=checkbox name=tx_spinpreferences_pi1[chkbox_1] >
>
> Depends on the conditions of my script ... So how can I be able to
> produce two fields?
>
> <input type=checkbox
> name=tx_spinpreferences_pi1[chkbox_page.5.field=id]
> page.6.field=chk_variable>
>
> That won't work of course, but it's something I would've wanted to do =)
>
>
> Can anyone please help me out??
> Elijah A.
>
>
> _______________________________________________
> Typo3-dev mailing list
> Typo3-dev at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev
>
More information about the TYPO3-dev
mailing list