How can I pass page variable to a form builder function in a custom module? I have an entity page where the entity has an email field. On that page, there is a form built in a custom module. What I'd like to to is that on form submit, the module sends an email to the address that is the value in the entity field.

So somehow I need to pass that email address to the form submit function.

What is the best way of doing this?
One way is to put either the e-mail or an ID referencing the e-mail (the NID of the node where it is stored for example) as a hidden field, which will be received by your submit handler hook.

https://api.drupal.org/api/drupal/developer!topics!forms_api_reference.html/7#hidden