It´s a restaurants website. There´s a view where the user sees a list of all the restaurants in the website. These restaurants are "nodes". Each restaurant has an email field defined with CCK email field.
1) The question is: i want the contact form on the bottom of each restaurant page to send to the value of the email field(not to the writer of the node).
2) There should be a contact form on the bottom of the view too, where each restaurant will have a check box. The restaurants with the marked checkboxes will receive the content of the contact form sent to their email field value.
This is what i want to do:
My view should be like this: http://www.pipa.com.br/conteudo/servicos/pesquisa_imoveis.asp?idi=2
My node should be like this: http://www.pipa.com.br/vendeseterreno/english/
How can i do that? Can anyone help?
I even installed "Contact form on a Node" module, but no use.
Comments
Download webform and webform
Download webform and webform block module, and then place the form in the node as a block.
contact forms, webform
i´m not sure i understood... how do i add that to the node? And how can the form get the node email adress(each node is a client with it´s own email address) the messages sent throught the form on the bottom of the page should go to him.
Is webform the best way to do that.
Did you get it to work
If so how? I am looking for the same solution.
I tried to make this work...
So far it looks like Webform has no means of pulling the CCK email value from out of the node and then using it.
It offers only two means of establishing a destination address. 1.) manually enter one while configuring the webform, or 2.) Make it dependent on a component value by using a Conditional e-mail recipients.
Two of the available components would seem to have potential... The first is the Markup component which allows PHP. Therefore it is possible to load the node data in the webform block and get the email address. However, it turn out this component is not among those that can be used to supply a conditional e-mail recipients. The Second option is the Hidden component. Which is particularly nice because it is hidden. (Why go through all this mess unless you are trying to protect people's email addresses from being harvested.) Anyway, this field doesn't seem to support PHP although it does seem to be an option for conditional e-mail recipients.
Then I discovered the following on the webform page:
But after more testing even this yielded no fruit. Under additional processing I was able to change value of my Hidden field to set a conditional e-mail recipient as follows:
But it looks like processing only occurs after the email is sent. In my case the default Hidden field value was emailed to me. But the database reflected the CCK field value change. I should also say the code above seemed to mess up the success message.
Oh well. I feel like I was very close here. Any ideas before I write an old fashioned email form? I wish I could find out what additional processing options exist?
Success
I got it to work after finding this page: http://drupal.org/node/323666 and experimenting for a while.
Basically, I disabled the standard recipient email entirely and inserted the PHP below in the Webform advanced settings>Additional Processing field.