I have a macro that has several edit text widgets and a button to save these inputs to the fields of a newly created tiddler (see code below). I'm having some issues with one particular field, namely the archive field. The input is the filename of the image and what should be placed in the archive field of the new tiddler is: ./Archival_images/filename. However, what ends up being placed in there is the ./Archival_images/ string repeated a seemingly random number of times. I've seen it repeated anywhere from three times to eighteen times. I've tried slashes with both directions with no difference. I've also tried the wikify widget without the output and mode options with no difference in behavior. Any ideas on why that might be happening?
Thanks in advance.
\define newtext(image)
<a href="./Images/$image$.jpg" target="_blank"> <img src="./Images/$image$.webp"></a>
\end
\define newarchive(archive)
./Archival_images/$archive$
\end
\define newImageEntry()
<$vars
temp="$:/temp/NewImageEntry">
Image Filename:
<$edit-text
tiddler=<<temp>>
field=filename
tag=input
class=fieldinput
size=64
/>
<p/>
Archival Image Filename:
<$edit-text
tiddler=<<temp>>
field=archive
tag=input
class=fieldinput
size=64
/>
<p/>
Image Category:
<$edit-text
tiddler=<<temp>>
field=category
tag=input
class=fieldinput
size=64
placeholder="Enter all categories separated by a comma."
/>
<p/>
Image Label:
<$edit-text
tiddler=<<temp>>
field=label
class=fieldinput
tag=input
placeholder="Enter a brief label for the image."
size=64
/>
<p/>
Image Details:
<$edit-text
tiddler=<<temp>>
field=details
class=fieldarea
tag=textarea
placeholder="Enter any detailed information about the image."
/>
<p/>
Surnames:
<$edit-text
tiddler=<<temp>>
field=surnames
tag=input
class=fieldinput
size=64
placeholder="Enter all surnames separated by a comma."
/>
<p/>
<$button tooltip="save input"> {{$:/images/google-material-design/image/two-tone/24px/add-a-photo}} Add New Image
<$vars
filename={{{ [title<temp>get[filename]] }}}
archive={{{ [title<temp>get[archive]] }}}
category={{{ [title<temp>get[category]] }}}
label={{{ [title<temp>get[label]] }}}
details={{{ [title<temp>get[details]] }}}
>
<$wikify name="text" text="""<$macrocall $name=newtext image=<<filename>> />""" output=html mode=inline>
<$wikify name="archive" text="""<$macrocall $name=newarchive archive=<<archive>> />""" output=html mode=inline>
<$set name="newtags" filter="[title<temp>get[surnames]split[,]] [[image]]">
<$action-createtiddler
$basetitle=<<filename>>
text=<<text>>
category=<<category>>
details=<<details>>
label=<<label>>
tags=<<newtags>>
archive=<<archive>>
hide-body="yes"
/>
</$set>
</$wikify>
</$wikify>
</$vars>
<$action-deletetiddler $filter="[<temp>]" />
</$button>
<$button tooltip="cancel input"> {{$:/core/images/cancel-button}} Clear Entries
<$action-deletetiddler $filter="[<temp>]" />
</$button>
</$vars>
\end