Skip to content

Instantly share code, notes, and snippets.

@nikibrown
Created January 13, 2011 17:34
Show Gist options
  • Save nikibrown/778228 to your computer and use it in GitHub Desktop.
Save nikibrown/778228 to your computer and use it in GitHub Desktop.
display entries from a form
<script type='text/javascript'>
$(function() {
function processEntries(data) {
$("<div>", {
"id": "the-entries"
}).appendTo("#page-wrap");
$.each(data.Entries, function(entriesIndex, entriesObject) {
$("<ul>", {
"id": "field-row-" + entriesIndex
}).appendTo("#the-entries");
var i = 0;
$.each(entriesObject, function(fieldID, value) {
$("#field-row-" + i).append(
"<li>" + value + "</li>"
);
i++;
});
});
};
$.wufooAPI.getEntries({
"callback" : processEntries,
"formHash" : "q7p4q7",
"getterPath" : "../",
"sortID" : "EntryID",
"sortDirection" : "DESC"
});
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment