I'd like to be able to programmatically submit a form, entirely within a function of mine. I'm doing this to take advantage of the PayPal addon. I've been looking through the docs but haven't figured out how to do this.
So, is there a way to do something like this? Here's some pseudo-code showing what I'd like to do:
function my_plugin_do_payment() {
$form = new GravityFormForm($form_id); // get some sort of form instance
$form->setField(1, '69.95'); // then set some product/price fields, as needed for PayPal
$form->submit(); // submit the form, sending my user to PayPal to pay for his purchase, and firing the normal gform hooks.
}
Thanks,
John