A few months ago I created a form for a client where one field in the form accepts an integer, and the following script counts up the values of this form field from all the submitted entries and echoes it on a text widget I made.
function raoc_counter($atts, $content = null) {
$summary = RGFormsModel::get_form_counts(1);
$today = date("F j, Y");
return '<div class="racount"><div class="racount1">There have been</div><div class="racount2">'.$summary["total"].'</div><div class="racount3">RANDOM ACTS OF CULTUREas of '.$today.'Count with us to 1,000!</div>';
}
add_shortcode("raoc", "raoc_counter");
See the How Many Random Acts widget on this page:
http://www.knightarts.org/random-acts-of-culture
When the client goes into the existing form entries and changes the # in that field, the count should increase or decrease appropriately. But it isn't doing anything at all right now. Is there a problem with my code? Anyone see anything obvious that I'm missing? Client says it was working earlier and now it's not.