11 years ago
2
Topic

Hello,

I Created a Form to permit to my web site visitors to submit ads è this form is called “Publier une annonce”.

Visitors can submit their ads on the front end and They must fill their Email Adress on the field called “Email_annonceur”

A added a field (called Confirmer annonce) which send an confirmation email to the person who submitted an ad.

I created a search & List form which permit to visitors to consult ads on the front end.

All things work well ! Thanks SEBLOD!

Now, I wand that visitors, when viewing ads, can send an Email to ths person who had submitted the ad.

To do this,

I added an Free Text Field to the First Form (“Publier une annonce”) and I linked this field to a Contact Form (Option 2).

On the contact form, I added an Email Field ( called “envoyer email à l’annonceur”)

But, Now, I don’t know how to get the Email of the person who had submitted the ad (Field “Email_annonceur”) ! to put it on the configuration of the Email field on the contact form ( called “envoyer email à l’annonceur”)!

I tied by putting the name of the Email field (“Email_annonceur”) on the configuration of the Email Field on the contact form but it does’nt work! Should I indicate the name of the initial form (“Publier une annonce”) ? How?

Thanks for your help and I’m sorry for my bad English.

Get a Book for SEBLOD
11 years ago
0
Level 1

Somme details about my configuration : thanks fo your help,

==>Form 1: Publish a post

·  Field 1 : Publisher name

·  Field 2 : Publisher Email

·  Field 3 : Publisher Post

·  Field 4 : To Send Confirmation Email to Publisher [Field Type == Email]

·  Field 5 : Free Text Field è Link to the Form 2 (in the Content View) è I used the option 2 to configure the link to the form2

·  Field 5 : Submit Button

==>Form 2: Send Email to publisher

·  Field 11 : Visitor name

·  Field 22 : Visitor Email

·  Field 33 : Visitor Message

·  Field 44 : To send Email to publisher (A message From the  visitor to the publisher)  è Hiden field [Field Type == Email]

o  Can you please tell me how should I Configure the “To (field)” field in the configuration of the field

o  The idea is to use the value of the Field 2 (Publisher Email) in the “To (field” of the field 44

·  Field 55 : Submit Button

==>List & Search: Consult posts

When the visitor consults a post, he can send an Email to the publisher.

To do this he must:

·  Click on the Field 5 button this button will open the form2 (Send Email to publisher).

·  The visitor fill the fields (11, 22, 33 and click on the Button submit).

·  An Email should be sent to the publisher.

The problem is that the email is not sent to the publisher


11 years ago
0
Level 1

Hi

1- if you want to send the visitor->publisher email from the content  view of the publisher's post, you only have to add a module field in the content view of the post which calls form2. This is very straightforward once you understood any content is a joomla content with its own ID.

in the form2 you retrieve the publisher's email with a field value plugin (button 2) specifying 'id' for the variable and publisher's email field from the post. Use the http://www.seblod.com/products/2311 plugin for that. you have to add a 'publisher's email' field (text fiedl) in the site view of form1, only to be filled with the Live cck field plugin.

in the form2 email field to only have to specify the field alias of the form2 'publisher's email' (that has been previously filled with the right value)


2- if you want to perform the same task but from the list of posts and not form the content view of a post, you may add a code field in the item view of the list, since you no longer can get the publisher's information from the URL. In this case you need to add the ARTICLE ID field of the post in the item view (hide it for example in the 'hidden' position of seb_blog) and write in the code field:

$id = $fields['art_id']->value; 
then again, with the ID of the post you can perform any SQL query in PHP, retrieving the publisher's email you store (with a $field[]->value function) in an empty field you would have created.

you can call any SQL query from a code field with the  JCckDatabase::loadObjectList( $query, 'name' ) function

Cyril


Get a Book for SEBLOD