Categories > TinyButStrong general >

opte=html; select with MergeBlock

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: rein
Date: 2007-08-28
Time: 10:46

opte=html; select with MergeBlock

I have the following code:

<select name='cust_id'>
    <option value='[cust.id;block=option]'>[cust.custNaam] ([cust.id])</option>
    <option>[data.cust_id; noerr; ope=html; select]</option>   
</select>

Even though the "data" block is merged first in the php code, the ;select doesn't seem to select when the data has one of the cust_id's in the [cust] block.

I tried to figure out the problem and eventually changed [data.cust_id; ...] to [var.cust_id; ...] and the thing worked.

To save anyone in the future from this error I'm reporting it here, so maybe you can optimize the html plugin so it merges the blocks in the correct order so the data is displayed as expected.
By: Skrol29
Date: 2007-08-28
Time: 23:43

Re: opte=html; select with MergeBlock

Hi,

The plug-in hasn't any order.
The section can be done only if the block "cust" is already merged.

The [data] item has to be merged after the block "cust". Other wise it won't found any corresponding value. A [var] field works well because such fields are merged when you call $TBS->Show().
By: rein
Date: 2007-08-29
Time: 15:55

Re: opte=html; select with MergeBlock

Thanks very much.

I do understand now why this works this way.
But maybe TBS should have a way to report such errors, because they are pretty difficult to find.

Anyways, thanks for the help.