I find the manual and the examples sections useful more most topics concerning TBS but I wish there were more examples for conditional statements. There seem to be many different ways to use conditionals but I'm not sure of the best way to implement what I need.
I'm using a TBS template to dynamically produce an option dropdown with multiple entries.
<option value="[author_checklist.id;block=option]">
[author_checklist.name;block=option]
</option>
|
I'd like to have one of my dynamically created entries be selected if the value of author_checklist.id is the same as the value of a variable named authorid. I've tried a bunch of different permutations of the syntax I see for conditonals in the examples section and the manual but none of them are working for me as I'd like. I was able to get a dynamically created checklist to check items as I'd like using conditionals but still can't get my option values to work as I need.
Here's my code as it is right now:
<option value="[author_checklist.id;block=option]" [onshow;block=begin;when[author_checklist.id]=authorid] selected="selected"
[onshow;block=end]>
[author_checklist.name;block=option]
|
I realize I may have made this code more complex than it needs to be but I'm really confused now and have resorted to just trying random things.