Hey,
Following idea:
I want to submit a form entry for a gform during a custom registration process of a theme (templatic StoreBox: http://templatic.com/ecommerce-themes/storebox). Background is a small poll which should be filled out during the registration process while sending the information to the database, but not directly to the user meta.
I cannot use the user registration functions of gravity forms because the registration process of the theme has to be used.
I am using the newest gravity forms version (1.5.2.8)
I thought about two ways but couldn't succeed for now:
1) embedding the form via gravity_form() with ajax support, disabling the submit button, firing the event when registration button clicked
what i did:
in the template file:
<?php gravity_form(1, false, false, false, '', true) ?>
in functions.php:
gravity_form_enqueue_scripts(1, true);
But the ajax functionality seems to not work, any idea why? couldn't find a hint in the source code, because i used the same form via shortcode in a post and it worked with ajax. i looked through the html code of both pages and couldn't find missing js or anything...
Anyways I also had another solution in mind:
2) Building the Form fields of the poll in the registration form and submitting it, then in the postprocessing create a form object and submitting it invisible.
Idea:
$form = new Form (...form data from post values...)
$form->submit();
or
gforms_submit_form(...form data from post values..);
But i couldn't figure out how to make this work... is this possible? couldn' find a hint in the forum / docs.
If not it would be a feature request to send Form submitions just via a function call without using an actual html form.
thanks a lot for your help!