|
|||||||
| Registrieren | Hilfe | Benutzerliste | Kalender | Suchen | Heutige Beiträge | Alle Foren als gelesen markieren |
|
#1
|
|||
|
|||
|
Hi there,
Would be great if you have a hint for me! I want to display the values of a multible checkbox if they are checked. 20. = TEXT 20.data = LLL:EXT:feuserext/locallang_db.xml:fe_users.tx_feuserext_arzt_praxin fo.I.1 20.if.isTrue.data = DB : fe_users:24:tx_feuserext_arzt_praxinfo|1 But it didn't work. Is there a solution in typoscript so i can easily do this without php or even writing all the possible values of a multible checkbox (19x19x..) or by calculating binary value with TS (how to)? hope anyone knows this. ciao Andreas _______________________________________________ TYPO3-english mailing list TYPO3-english (AT) lists (DOT) netfielders.de http://lists.netfielders.de/cgi-bin/.../typo3-english |
| Sponsored Links |
|
#2
|
|||
|
|||
|
Hi there,
For those who look: a rough solution: Include the following script e.c. with includeLibs.multipleSelect = fileadmin/templates/multipleCheckbox.inc That the script works you have to set some variables: ###### ## table = table where you want to find to find the multiple checkbox ## select = here you can set search criteria // or replace in the script 'uid="'.t3lib_div::_GP('userUID').'"' for e.c. ## var = name of the multiple checkbox in the table ## count = how many possible answers or values the variable has ## val = the value to check temp.checkbox = USER temp.checkbox.userFunc = user_selectFunc temp.checkbox.userFunc.table = fe_users temp.checkbox.userFunc.select = pid=24 temp.checkbox.userFunc.var = tx_feuserext_arzt_praxinfo1 temp.checkbox.userFunc.count = 19 So you can use it then e.c. like this: checkbox = TEXT checkbox.data = LLL:EXT:feuserext/locallang_db.xml:fe_users.tx_feuserext_arzt_praxin fo.I.1 checkbox.wrap = <b>|</b> checkbox.if.isTrue.cObject < temp.checkbox checkbox.if.isTrue.cObject.userFunc.val = 1 And here the script (still leaking in the matter of not enough time thanx to rainer & co: <?php function user_selectFunc($content,$conf) { $boxArr[] = array(); $lConf = $conf["userFunc."];; $table = $lConf["table"]; $select = $lConf["select"]; $var = $lConf["var"]; $count = $lConf["count"]; $val = $lConf["val"]; $k = 1; $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($var,$table,$select,'','',''); $row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res); $features = $row[$var]; for ($m=0; $m < $count; $m++) { if ($features & $k) { $boxArr[$m]=1; } else { $boxArr[$m]=0; } $k *= 2; } $content = $boxArr[$val]; return $content; } ?> > I want to display the values of a multible checkbox if they are checked. > > 20. = TEXT > 20.data = > LLL:EXT:feuserext/locallang_db.xml:fe_users.tx_feuserext_arzt_praxin fo.I.1 > 20.if.isTrue.data = DB : fe_users:24:tx_feuserext_arzt_praxinfo|1 > _______________________________________________ TYPO3-english mailing list TYPO3-english (AT) lists (DOT) netfielders.de http://lists.netfielders.de/cgi-bin/.../typo3-english |
|
#3
|
|||
|
|||
|
Hi there,
For those who look: a rough solution: since you cant write longer posts here look at: http://www.typo3forum.net/forum/typo...-checkbox.html nice day! Andreas _______________________________________________ TYPO3-english mailing list TYPO3-english (AT) lists (DOT) netfielders.de http://lists.netfielders.de/cgi-bin/.../typo3-english |
| Lesezeichen |
| Themen-Optionen | |
| Ansicht | Thema bewerten |
|
|
|
||||
| Thema | Autor | Forum | Antworten | Letzter Beitrag |
| Re: [TYPO3] Reference multiple checkbox fields (TS) | Andre Stein | typo3-english@lists.netfielders.de | 1 | 13.12.2006 15:56 |