Autopaste & {if}

Hi!
I have a minor issue.

When a snippet only contains text, the snippet is inserted instantly, compared to a snippet containing a formtoggle, the snippet needs a validation before inserting.

{if: contains({site: url}, "blaze.today")}Text text text{else}{formtoggle: name=1; default=no}formtoggle text{endformtoggle}{endif}

In the snippet above, when the if statement is true, the snippet also needs validation - it seems the formtoggle triggers this even when its not relevant.

Is there any workaround for this?

Hi Ben,

You are correct. The form window is triggered because of the formtoggle, even when that formtoggle is not relevant.

Currently, form commands anywhere in a snippet will trigger the form window. This applies even when dynamic logic (like {if} conditions) would hide those form commands in the snippet preview.

There isn't a way to prevent this right now. We want to improve it in the future, but, there is no timeline for it currently.

Thanks for the feedback.
I have moved this to the feature ideas category