Hi,
I installed 'view contact form' module today, surprisingly not working as expected and i can't see any view contact form format in the views. I found in the code class files in [module directory]/lib/Drupal/views_contact_form, generally for Drupal 8 class files should be in [module directory]/src if i am not wrong. Is it something missing with this module ?? seems no one reported on this issue.
Issue fork views_contact_form-3088807
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
Search4 commentedHi, i have the same problem. Did you find the solution?
Comment #3
viswanathsai commentedMaybe this module is not under active maintenance, i resolved my issue by using pseudo field to store email id of user which i got by form_id, i can use that field as recipient email field to send mails to contact form user.
function hook_form_alter(&$form, &$form_state, $form_id) {
// Recipient Email Dynamically
$form_uid = $form['#form_id'];
$formid = preg_replace("/[^0-9]/", '', $form_uid);
if (!empty($formid)) {
$account = \Drupal\user\Entity\User::load($formid); // pass your uid
$recepiant_email = $account->getEmail();
$form['elements']['recepiant_email']['#default_value'] = $recipient_email;
}
// Recipient Email Dynamically END
}
Comment #6
balajidharmaComment #8
balajidharmaIssue fixed on 2.x branch and tested latest D9 version
https://www.drupal.org/project/views_contact_form/releases/2.x-dev