Answer the question
In order to leave comments, you need to log in
Drupal 7 and contact form?
Good day.
The essence of the question is this.
You need to make a feedback form, but not a standard one, like the Contact module, but a human one (placeholder and js a bit). Say that it is necessary to use webform.
I put it and I do not find a single similarity with the instructions on the Internet.
I myself have never used any free cms, I saw drupal for the first time yesterday.
And you just need to make a website on this cms. (I would have done it on my cms a long time ago). 2nd day I'm already suffering.
So who is aware of my question, can you tell on your fingers how I can solve this problem?
And how can I display the last few articles on the main page? More precisely, how to call it in the page.tpl.php file?
Answer the question
In order to leave comments, you need to log in
You need to make a feedback form, but not a standard one, like the Contact module, but a human one (placeholder and js a bit)
function %имятемы%_theme() {
return array( 'contact_site_form' => array(
'render element' => 'form',
'template' => 'contact-site-form',
'path' => drupal_get_path('theme', '%имятемы%').'/templates',
),
);
}
function %имятемы%_preprocess_contact_site_form(&$vars)
{
$vars['form_html'] = drupal_render_children($vars['form']);
/* $vars['name'] = drupal_render($vars['form']['name']);
$vars['email'] = drupal_render($vars['form']['mail']);
$vars['subject'] = drupal_render($vars['form']['subject']);
$vars['message'] = drupal_render($vars['form']['message']);
$vars['copy'] = drupal_render($vars['form']['copy']);
$vars['submit'] = drupal_render($vars['form']['submit']); */
}
<p>Пишите письма!</p>
<div class="submit-contact-form"><?php print $form_html; ?></div>
And how can I display a few recent articles on the main page
I made a feedback form for the diploma in the form of a node, which is allowed to be created by anonymous people, they are automatically created unpublished.
and separately there you can already edit the form, put jquery scripts through murkUp, and so on ...
And look.
1. you do two views. one - on which unpublished.
2. put the Rules module, you prescribe an action in it, so that after someone comments this review, it would receive the status published. in the same Rules you write that this comment should be sent to the mailbox specified in the form field. (which the anonymous person indicated)
(there may be a problem only in setting up the server, SMTP)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question