How to Send different letters to different users with list email plugin

@cheesegrits , I would like to send letters with invitation on the site. In the employee form I have field which is responsible for position.

Taking into account that each invited user should be registered under the company I need to have for example three types of invitations(user registration forms) for different groups or to make processing of variable position.

User registration form should have variable parent group(company) which depend on the company which send invitation and target group for user to whom invitation will be send.
 
For sending different emails for different "positions", easiest way would be to have 3 copies of the email plugin, with a "Condition" that works out which one to run ... so if you "position" element has values 1, 2 and 3 ...

Code:
return $data['yourtable___position_raw'] == '1';

... would run only when the position is 1. Make the condition for 2 and 3 on the other two copies.
 
I tried to use it, but suppose that the condition is not correct because, cannot run the email plugin. I tried on the dropdown element.

Code:
return $data['yourtable___position_raw'] == 'Position';

Id of the list 26
 
Ah, yes, if it's a dropdown, the data will be an array, so ...

Code:
return FArrayHelper::getValue($data['yourtable___position_raw'], 0, '') == 'Position';

-- hugh
 
Var dump the form data, see what you get ...

var_dump($data);exit;

Paste the output here.

(xxxx out any variable names you don't want showing, like xxxxx_id)

-- hugh
 
I have checked in the console.
Besides, I did not get any error on the front-end.

JQMIGRATE: Migrate is installed, version 1.4.1
2http://xxxxxxxxx.com/index.php/operations/data/index.php?option=com_fabr?pl=component&ajax=1&id=26&renderOrder=2&ids[]=16&checkAll=0&format=partial Failed to load resource: the server responded with a status of 500 (Internal Server Error)
mootools-more.js:190 Uncaught TypeError: Cannot read property 'getScroll' of null
at Object.setOffsetOption (mootools-more.js:190)
at Object.getOptions (mootools-more.js:188)
at Object.getPosition (mootools-more.js:193)
at HTMLDivElement.calculatePosition (mootools-more.js:207)
at HTMLDivElement.position (mootools-more.js:206)
at Object.position (mootools-more.js:227)
at Object.e.extend.$owner (mootools-core.js:38)
at m (mootools-core.js:118)
jquery.min.js:4 POST http://xxxxxxxx.com/index.php/opera...derOrder=2&ids[]=16&checkAll=0&format=partial 500 (Internal Server Error)
send @ jquery.min.js:4
ajax @ jquery.min.js:4
loadContent @ window.js:2
e.extend.$owner @ mootools-core.js:38
makeWindow @ window.js:2
e.extend.$owner @ mootools-core.js:38
initialize @ window.js:2
(anonymous) @ mootools-more.js:27
e.extend.$owner @ mootools-core.js:38
(anonymous) @ mootools-core.js:37
b.getWindow @ window.js:2
buttonAction @ email-min.js:2
e.extend.$owner @ mootools-core.js:38
(anonymous) @ list-plugin.js:2
c @ mootools-core.js:124
w @ mootools-core.js:128
m @ mootools-core.js:119
Navigated to http://xxxxxxx.com/index.php/operations/data/employees?resetfilters=0&clearordering=0&clearfilters=0
jquery-migrate.min.js:2 JQMIGRATE: Migrate is installed, version 1.4.1
jquery.min.js:4 POST http://dev.evg-soft.com/index.php/o...derOrder=2&ids[]=16&checkAll=0&format=partial 500 (Internal Server Error)
 
What page is this on?

All the above console stuff looks like it's from a list display, not submitting a form.

-- hugh
 
Oh, I didn't see 'list email plugin' in the Subject. I thought you were talking about submitting a form.

I'll have to check the list plugin settings.

-- hugh
 
There really isn't a way in the list email plugin to alter the message. The template is created once, when the page loads, and is submitted with the AJAX call that fires when you press the button. So you can even use a PHP template to alter the content depending on the submitted data.

You may have to use three different plugins, with different templates.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top