Categories > TinyButStrong general >

Plug-in: Selecting items

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Vitor
Date: 2006-12-15
Time: 15:09

Plug-in: Selecting items

Hello forum.
Sorry about my english ok ?

I have a bizarre problem..

PHP CODE
$Registros = $e201000->Obter( $_1000 );
$TBS->MergeBlock( 'blk' , $Registros );           
/*
$Registros array...
Array
(
    [0] => Array
        (
            [1000] => d6c422fdd3d0e85065c7b0cf26371be22237
            [6000] => OPQ
            [6010] => Sexta Conta
            [6020] => 0
            [6030] => 67f916b46e494309598b082f1eb02e901347
            [ContaMae] => Quarta Conta
        )

)
*/

HTML CODE
  <tr>
    <td bgcolor="#C9CDD6" width="110" align="left"><b>*É conta mãe ?</b></td>
    <td bgcolor="#E5E7EB" width="60"><label for="p201000_6020">Sim</label><input type="checkbox" value="1" name="p201000_6020" id="p201000_6020" onclick="return ContaMae();" />[blk.6020;ope=html;select=p201000_6020]</td>
    <td bgcolor="#C9CDD6" width="110" align="left"><b>*Conta mãe:</b></td>
    <td bgcolor="#E5E7EB"><select name="p201000_6030" id="p201000_6030" disabled="disabled"><option value="[blk1.201000_1000;block=option]">[blk1.201000_6010]</option><option value="x">[blk.6030;ope=html;select]</option></select> [blk.6030]<br />[blk.6030]<br />[blk.6030]</td>
  </tr>

I put 3 [blk.6030] to test .. because i can't get my combo box selected.
And got the follow result:

[blk.6030]
67f916b46e494309598b082f1eb02e901347
67f916b46e494309598b082f1eb02e901347
By: RwD
Date: 2006-12-17
Time: 18:01

Re: Plug-in: Selecting items

Well, honestly... Your template is bizarre :P
Your blocks are out of bounds... When you declare a block delimted by option (block=option) then all tbs tags for blk have to be in between the option elements. Most of yours are outside. Also you have blocks called blk1 which I can't find back inside of your php code. I think they should be called blk as well.

Sorry I can't help you any fiurther then this. Because your template doesn't make sense to me... You are probably best off when copying an example from this website and then adapt it to your specific needs.

One tip: these numbers like 6030.. Unless they have some significant meaning it would be better to use symbolic names like "dateOfBirth" or "maidenName"

Two tip: Use entities instead of these spanish symbols. Otherwise you cannot know how these will display on machines that might not understand the symbols directly but does know the entity.

(Don't mind my English; I did it on purpose :P)
By: Skrol29
Date: 2006-12-18
Time: 00:59

Re: Plug-in: Selecting items

Hi Vitor,

I cannot reproduce your problem.
I've tested your snippet I got all [blk.6030] displayed correctly and items correctly selected. TBS 3.2.