Skip to content

Instantly share code, notes, and snippets.

@spivurno
Created September 28, 2012 23:29
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 spivurno/3802601 to your computer and use it in GitHub Desktop.
Save spivurno/3802601 to your computer and use it in GitHub Desktop.
// one field limited by sum
new GWLimitBySum(array(
'form_id' => 113,
'field_id' => 13.3,
'limit' => 8,
'limit_message' => 'Sorry, there are no more tickets!',
'validation_message' => 'You ordered %1$s tickets. There are only %2$s tickets left.',
'approved_payments_only' => false,
'hide_form' => false
));
// and now another on the same form
new GWLimitBySum(array(
'form_id' => 113,
'field_id' => 16.3,
'limit' => 25,
'limit_message' => 'Sorry, there are no more soccer balls!',
'validation_message' => 'You ordered %1$s tickets. There are only %2$s tickets left.',
'approved_payments_only' => false,
'hide_form' => false
));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment