Reply New Topic
2010/10/3 16:29:01
#1
Offline
Quite a regular

email multiple users with contact 1.6 (or liaise 1.26)

I currently have Contact with captcha 1.6 and Liaise 1.26 installed on ICMS 1.2.2. I have chosen Contact with Captcha 1.6 because it allows me to select via a dropdown who the email is sent to rather than just admin. I would rather use Liaise 1.26 but have yet to figure out how to get an email sent to someone other than the webmaster or ALL registered users. So in the mean time I am using Contact with Captcha.  My only issue is that I would like my users to be able to select multiple users from the select few I add in the back end. I think I have narrowed out the code, but don't know what to change it to.
// show a drop down with the correct departments listed $departmentlist = new XoopsFormSelect( $contactclass->getDepartmentTitle(), "userDepartment" ); $departments = $contactclass->getDepartments(); // get array of departments $selDept = $contactclass->getSelectedDepartment(); $cnt = 0; foreach( $departments as $val ) { $valexplode = explode( ',', $val ); $selected = false; if ( $selDept != "" && ( strcmp( $selDept, $valexplode[0] ) == 0 ) ) { // this option is selected $selected = true; } else if ( $selDept == "" && $cnt == 0 ) // if there is none selected and this is the first one { // make it selected $selected = true; } $departmentlist->addOption($valexplode[0]); if ( $selected == true ) { $departmentlist->setValue($valexplode[0]); } $cnt++; } $contact_form->addElement( $departmentlist ); }


Reply New Topic extras
 Previous Topic   Next Topic
You can view topic.
You can start a new topic.
You can reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You can post without approval.