The Page Analytics I use gathers the form data automatically. Gravity Forms create tag without any name attribute. I am trying to figure out a way to assign form tag a name attribute. The closest I have reached is this example:
<?php
add_filter("gform_form_tag", "form_tag", 10, 2);
function form_tag($form_tag, $form){
if ($form["id"] == 3){
$form_tag = preg_replace("|action='(.*?)'|", "action='custom_handler.php'", $form_tag);
return $form_tag;
}
}
?>
But I am not sure how to use preg_replace to create a name attribute for form in question.