When using Gravity Forms, you can easily retrieve the data of any lead using this feature. This function checks for the form id and the field ids. It will also ignore legacy values such as form_id, which means that it does not handle old-style fields. You can also use this function to create a new plan ID based on a feed.
How to Retrieve a Lead Detail From Gravity Forms