Skip to content

Instantly share code, notes, and snippets.

@goldsky
Created June 20, 2014 05:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save goldsky/5257da19d4ae186c72c9 to your computer and use it in GitHub Desktop.
Save goldsky/5257da19d4ae186c72c9 to your computer and use it in GitHub Desktop.
Wrapper chunk for step-1 field of dynamic field for FormIt
[[+dynfield.items]]
<script>
function addRow(button) {
var newRow = '[[$step1DynamicFields.item:chunkToJsProperty]]' + "&nbsp;\n";
$(newRow).insertBefore($(button));
}
function removeRow(button) {
$(button).parent().parent().remove();
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment