Linking to an e-mail form

rcadmin 23 Aug, 2013
When a user searches for a record and then click on the found link (in my case it is a list of staff members) rather than edit that record, I want a form to open up that will allow the user to send an e-mail (e-mail address is part of the record) to that staff member.

Not sure how to do this.
GreyHead 24 Aug, 2013
Hi rcadmin,

If you want them to send an email from their 'normal' email software you could build a mailto: link around the address. Or, if you want to send a ChronoForms email, then I think that you can link to a form. In either case I'd do that using a Custom listing - it may be possible to do it with a standard listing but you'd need Max to tell you how and he seems to be away at the moment.

Bob
rcadmin 24 Aug, 2013
I am currently using a custom listing so that would be good.

My body looks as follows

<tr>
  <td>{title}</td>
  <td><a href='index.php?option=com_chronoforms&chronoform=dd_view&surname={surname}' >{surname}</a></td>
  <td>{subjects}</td>
  <td>{management}</td>
</tr>


If I had a form called staffemail, how would I change the 2nd line so that clicking on the {surname} field bought up the staffemail form, passing the associated {email} link (which is not shown in the listing but is in the record).
rcadmin 25 Aug, 2013
Ok so this is where I stand.

Using Chronoconnectivity I am generating a staff directory using the custom listing. The body of the custom listing is:
<tr>
  <td>{title}</td>
  <td>{surname}</a></td>
  <td>{subjects}</td>
  <td>{management}</td>
</tr>


When the end-user clicks on the surname, I want it to bring up an e-mail form.

I have created a Chronoform form called EmailStaff.

In Chronoconnectivity, Frontend Listings, General, I can see Linkable fields in which I have listed surname.

I am however not sure where to go from there. The surname comes up as a hyperlink (but as follows: index.php/component/chronoconnectivity/StaffList/cc_edit_data).

What do I need to put in my body so that it links to the EmailStaff form, passing the fields from Chronoconnectivity?
rcadmin 27 Aug, 2013
Thanks to Bob and Max, I got it sorted.

Firstly as I am using custom listings I don't need editable or linkable fields in the general section of the Frontpage listing.

Changed my body to
<tr>
  <td>{title}</td>
  <td><a href="index.php?option=com_chronoforms&chronoform=EmailStaff&email={email}">{surname}</a></td>
  <td>{subjects}</td>
  <td>{management}</td>
</tr>
GreyHead 27 Aug, 2013
Hi rcadmin,

That should work fine - the only potential problem is that the email address 'might' need to be urlencoded if you have any unconventional email addresses.

Bob
rcadmin 27 Aug, 2013
Actually I was thinking that I would rather have the address hidden totally so that they are not harvested. This is easy enough to do as I can generate them from the names, initials and department name in the EmailStaff form so I want need to pass it across.
GreyHead 28 Aug, 2013
Hi rcadmin,

If it's a public form I'd be inclined to use some kind of random identifier and the look up the email on the server.

Bob
This topic is locked and no more replies can be posted.