Is there any way to insert the value enclosed in brackets ?
So... let's say you have a title of "Foo Bar Baz" (i.e., text containing spaces). Then, when you create a new tiddler using somefield={{!!title}}, the resulting value of somefield will still be "Foo Bar Baz" (i.e., a single text value containing spaces). For almost all purposes, this will be sufficient, and subsequent references to {{!!somefield}} will still result as a single text value containing spaces. Nonetheless, it still possible to save the field value including added brackets, so that it will be stored as "[[Foo Bar Baz]]". Here's one method for adding the brackets:
<$button> click me
<$vars lb="[[" rb="]]">
<$action-createtiddler $basetitle="SomethingNew" text="yabba dabba doo!" tags="foo bar baz" caption="this is a caption" somefield={{{ [{!!title}addprefix<lb>addsuffix<rb>] }}} />
</$vars>
</$button>
Notes:
* The $vars defines two variables that contain the literal "[[" and "]]" text
* The somefield parameter value is then assembled using "filtered transclusion" to add the brackets before and after the {!!title} value.
* The $vars is needed because you can't use literal square brackets as text within the filter syntax, since they would be interpreted as part of the filter syntax itself (i.e., you can't write ...addprefix[[[]... or ...addsuffix[]]]...)
Another way to achieve this is to use macros instead of $vars to define the lb and rb variables, like this:
\define lb() [[
\define rb() ]]
<$button> click me
<$action-createtiddler $basetitle="SomethingNew" text="yabba dabba doo!" tags="foo bar baz" caption="this is a caption" somefield={{{ [{!!title}addprefix<lb>addsuffix<rb>] }}} />
</$button>
enjoy,
-e