CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Feature Requests and Suggestions »
  • Usability Improvements (Moderator: Dave Greenberg) »
  • ForwardMailing with a multitude of email-Addresses copy/paste (inst. of 5 single)
Pages: [1]

Author Topic: ForwardMailing with a multitude of email-Addresses copy/paste (inst. of 5 single)  (Read 1024 times)

Mich___

  • I post occasionally
  • **
  • Posts: 30
  • Karma: 0
  • CiviCRM version: 4.7.6
  • CMS version: WordPress
  • MySQL version: 5
  • PHP version: 5.4.32
ForwardMailing with a multitude of email-Addresses copy/paste (inst. of 5 single)
October 25, 2014, 06:16:13 am
[Modified to include new questions]

Hi, I have following question:
The ForwardMailing Template is now set to 5 email addresses which have to be added separately.
We would like to  have one field where we would be able to copy paste an unlimited amount of
emails addresses in one step. Is there a template for such a thing, or how how would I alter ForwardMailing.tpl
to make this work? Right now, each email-entry-field only allows one email-address.

This is the function that runs the Form

Code: [Select]
  public function buildQuickForm() {
    for ($i = 0; $i < 5; $i++) {
      $this->add('text', "email_$i", ts('Email %1', array(1 => $i + 1)));
      $this->addRule("email_$i", ts('Email is not valid.'), 'email‘);
 }
   
I tried to change the addRule to 'emailList', which I could find in other forms:
$this->addRule('cc_receipt', ts('Please enter a valid list of comma delimited email addresses'), 'emailList');
but I will get a QuickForm Error: the rule does not exist as a registered rule.

Code: [Select]
  public function buildQuickForm() {
    for ($i = 0; $i < 1; $i++) {
      $this->add('text', "email_$i", ts('Email %1', array(1 => $i + 1)));
      $this->addRule("email_$i", ts('Please enter a valid list of comma delimited email addresses'), 'emailList');
 }

Unf. this does not work (I set the loop to 1 instead of 5 and changed the ts and 'emailList').
Any hints why 'emailList' is interpreted as "not registered rule"?

Best regards, M.
« Last Edit: January 16, 2015, 12:53:56 pm by Mich___ »

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: ForwardMailing with a multitude of email-Addresses copy/paste (inst. of 5 single)
October 25, 2014, 08:37:56 am

you will need to modify both the template and the corresponding php file

An easier/simpler mechanism might be to create your own "forwarding code" and use that instead of civi's and do so as an extension

if you do any of the above, please share your changes so others can benefit

thanx

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: ForwardMailing with a multitude of email-Addresses copy/paste (inst. of 5 single)
October 25, 2014, 10:57:17 am

Did u integrate that with CiviMail?

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

joanne

  • Administrator
  • Ask me questions
  • *****
  • Posts: 852
  • Karma: 83
  • CiviCRM version: 4.4.16
  • CMS version: Drupal 7
Re: ForwardMailing with a multitude of email-Addresses copy/paste (inst. of 5 single)
January 15, 2015, 01:34:18 pm
Please don't post a duplicate topic.  I have removed the duplicate.

If you want to remind people that you are still hoping for some guidance then post a polite "bump" on the original topic.


Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Feature Requests and Suggestions »
  • Usability Improvements (Moderator: Dave Greenberg) »
  • ForwardMailing with a multitude of email-Addresses copy/paste (inst. of 5 single)

This forum was archived on 2017-11-26.