Categories > TinyButStrong general >

Magnet parameter can delete the <input></input> tabs ???

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Webys
Date: 2005-04-27
Time: 16:16

Magnet parameter can delete the <input></input> tabs ???

If I have :

<INPUT name=age value="[blk.age;htmlconv=no;]" size=3>
    [if var.tgs_out=yes magnet=input;mtype=m+m]</input>

How can I make the result if variable tags_out==yes to delete <input> tag and let the  value from "blk.age" in place

Like this example:

<input name=age value="32" size=3></input>

... after magnet tag to show ....

32


Thanks.
By: Webys
Date: 2005-04-28
Time: 09:12

Re: Magnet parameter can delete the <input></input> tags ???

Skrol29  any tips?

Thanks.
By: Skrol29
Date: 2005-04-28
Time: 10:26

Re: Magnet parameter can delete the <input></input> tabs ???

Hello Webys,

When I have to do this, I use two TBS fields. On embedded in the <input>, another just after. Each one use a if-then-else, or use a prepared Php variable, or a onformat function.

Another way I use also is to make 2 blocks. One block with data in read/write using <input>, and another block with data only readable. The correct block is showed using [onload] tags.
By: Webys
Date: 2005-04-28
Time: 14:01

Re: Magnet parameter can delete the <input></input> tabs ???

The second solution I've used too But after that the template it's not so clean...so I'll try the first solution maybe is more elegant....

Thanks.
By: Skrol29
Date: 2005-04-28
Time: 14:03

Re: Magnet parameter can delete the <input></input> tabs ???

"not so clean" ?? !!
By: Webys
Date: 2005-04-28
Time: 16:17

Re: Magnet parameter can delete the <input></input> tabs ???

have many TBS tags, parameters in code with [onshow] and I have brake the limit of 64 [onshow] parameters and nothing works now ...

What can I do I wish to keep one php source file and use one TBS template and many sub templates .....but with this solution the 64 limit is over riched.....

Any tips?

Thanks.
By: Webys
Date: 2005-04-28
Time: 16:54

Re: Magnet parameter can delete the <input></input> tabs ???

Any tips other than  TBS fields

Thanks.
By: Skrol29
Date: 2005-04-28
Time: 16:54

Re: Magnet parameter can delete the <input></input> tabs ???

64 is very much, but there is no limit.

I suggested to use only 2 [onload] blocks.
Example :
<div>
  [onload_mode;block=div;when [var.mode_edit]=1]
  Age: <input name="age" value="[var.x_age]">
  Town: <input name="town" value="[var.x_town]">
  ...
</div>
<div>
  [onload_mode;block=div;default]
  Age: [var.x_age]
  Town: [var.x_town]
  ...
</div>
By: Webys
Date: 2005-05-03
Time: 14:44

Re: Magnet parameter can delete the <input></input> tabs ???

The TBS say:

TinyButStrong Error (Automatic fields): The field [onshow] can't be merged because the limit (64) is riched. You maybe have self-included templates
By: Skrol29
Date: 2005-05-03
Time: 19:07

Re: Magnet parameter can delete the <input></input> tabs ???

Yea, you're right, there is a limit for automatic fields encapsulation.
And it seems there is a bug here because it should be a level limitation not a number limitation.
I'll check that for the next fix or the next version.

Thanks for your report.