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.

Command icon 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

viswanathsai created an issue. See original summary.

Search4’s picture

Hi, i have the same problem. Did you find the solution?

viswanathsai’s picture

Maybe 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

}

balajidharma made their first commit to this issue’s fork.

balajidharma’s picture

Status: Active » Needs review

balajidharma’s picture

Version: 8.x-1.0 » 2.x-dev
Status: Needs review » Fixed

Issue fixed on 2.x branch and tested latest D9 version

https://www.drupal.org/project/views_contact_form/releases/2.x-dev

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.