Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [problem] z chechbox-ami w wyglądzie
Konuss
post
Post #1





Grupa: Zarejestrowani
Postów: 52
Pomógł: 0
Dołączył: 21.07.2005
Skąd: Konin

Ostrzeżenie: (0%)
-----


Witam a więc tak wyciągam sobie takim kodzikiem checkbox-a

  1. <?php
  2.  
  3. function _createCheckBox() {
  4. $aDefaultValuesTemp = explode(";",$this->aDefaultValues);
  5. $sOutTemp = "";
  6. $i = 0;
  7. foreach($aDefaultValuesTemp as $sDefaultValue) {
  8. $sOutTemp .= replaceVars(getConfig('templatecheckbox',0),'FieldName',$this->GetName());
  9. $sOutTemp = replaceVars($sOutTemp,'DefaultOptionValue',$i);
  10. $sOutTemp = replaceVars($sOutTemp,'DefaultValue',$sDefaultValue);
  11. $sOutTemp = replaceVars($sOutTemp,'Selected',((@in_array((string)$i,$this->aValues))?" checked":""));
  12. $i++;
  13. }
  14. ?>


a w templacie:

  1. <input type='checkbox' name='$FieldName$[]' value="$DefaultOptionValue$" $Selected$> $DefaultValue$


I mam taki problem jak zrobic aby wycignąc odrazu np 2 checkboxy lub 3 zeby stworzyc ładnie to w html bo jak mam np kilkanascie opcji to ni9e ładnie to wygląda. Proszę o pomoc

chodzi o cos takiego aby zrobic w html:

  1. <tr>
  2. <td>
  3. <input type='checkbox' name='$FieldName$[]' value="$DefaultOptionValue$" $Selected$> $DefaultValue$
  4. </td>
  5. <td>
  6. <input type='checkbox' name='$FieldName2$[]' value="$DefaultOptionValue2$" $Selected2$> $DefaultValue2$
  7. </td>
  8. <td>
  9. <input type='checkbox' name='$FieldName3$[]' value="$DefaultOptionValue3$" $Selected3$> $DefaultValue3$
  10. </td>
  11. </td>


Chyba mnie zrozumiecie (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 23.08.2025 - 12:58