Skip to content

Instantly share code, notes, and snippets.

@biilmann
Created December 3, 2012 19:58
Show Gist options
  • Save biilmann/4197563 to your computer and use it in GitHub Desktop.
Save biilmann/4197563 to your computer and use it in GitHub Desktop.
Using an extension to split a textarea into lines
<pop:content>
<select name="sizes">
<pop:utils:split field="sizes">
<option><pop:value/></option>
</pop:utils:split>
</select>
</pop:content>
exports.split = function(options, enclosed, scope) {
var val = scope.lookup(options.field);
if (val) { return val.split("\n"); }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment