function views_contact_form_handler::render in Views Contact Form 7
Render the field.
Parameters
array $values: The values retrieved from the database.
Overrides views_handler_field_user::render
File
- views/
views_contact_form_handler.inc, line 10
Class
Code
function render($values) {
if ($this->options['link_to_user'] == 'views_contact_form') {
// The view is empty, abort.
if (empty($this->view->result)) {
return;
}
$email = $this
->sanitize_value($this
->get_value($values));
if (valid_email_address($email)) {
$emails = array(
$email,
);
}
$form = drupal_get_form('views_contact_form_contact_form', $emails);
return drupal_render($form);
}
}