Skip to content

Instantly share code, notes, and snippets.

@goldsky
Created June 21, 2014 11:26
Show Gist options
  • Save goldsky/ca6d82dac106f53fd9ed to your computer and use it in GitHub Desktop.
Save goldsky/ca6d82dac106f53fd9ed to your computer and use it in GitHub Desktop.
Wrapper chunk for step-2 field of dynamic field for FormIt
[[+dynfield.items]]
<script>
function addRow(button) {
var newRow = '[[$step2DynamicFields.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