Delimit, context?

The partial below gives me what I need and works fine if I sneak the delimit in (the last line) while ‘hugo serve’ is running, however a fresh build with ‘hugo’ fails with error:
execute of template failed: template: partials/buy_now.html:33:59: executing “partials/buy_now.html” at <delimit .select " | ">: error calling delimit: can’t iterate over

{{ range .Site.Data.products }}
      {{ if eq .identifier $.Page.Params.identifier }}
        {{ range $index, $element := .options }}
          {{ if eq .name "Message" }}
            data-item-custom{{ add $index 1 }}-type="textarea"
          {{ else }}
            data-item-custom{{ add $index 1 }}-name="{{ $ }}"
            data-item-custom{{ add $index 1 }}-options="{{ delimit $ " | "}}"
          {{ end }}  
        {{ end }}
      {{ end }}
    {{ end }}


Please include code samples in code fences like so
code goes here
That makes it easily recognizable (and legible)
Similarly, inline code is limited by `, not '.

To your question: It is nearly impossible to figure out what’s going on without knowing what $element contains. Which you don’t tell us.
delimit expects an array, slice or map as its first parameter. So I guess that $ is something else, in any case not something that can be iterated over. Which is basically what the error message already said.
Furthermore, the error message seems to indicate that maybe $element is not what you think it is. You could sprinkle the code of your partial with call to warnf to see what the relevant variables etc. contain.