I Created a
Form to permit to my web site visitors to submit ads è this form is called “Publier une
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
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).
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?
your help and I’m sorry for my bad English.
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