[Typo3] Typoscript: setup.txt for extension: having two fields to wrap?
Elijah Alcantara
elijah.alcantara at gmail.com
Thu Oct 20 04:38:20 CEST 2005
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.
More information about the TYPO3-english
mailing list