Hi login418,
First, if you don't have any 'fixed' lists that you want everyone to subscribe to the leave out hiddenlists.
Second, there are two ways to convert your options into lists. The easiest is just to set the option values to the list ids and name the select box 'subscription' :
- Code: Select all
3=Fashion Event
4=Themed Event
5=Music Event
6=Movie Event
7=Golf Event
8=Charity Event
9=Commodities
1=Other
The more complicated route is to use a Custom code action to map from one to the other - this gives you more flexibility. You can keep the options as
- Code: Select all
Fashion=Fashion Event
Themed=Themed Event
Music=Music Event
Movie=Movie Event
Golf=Golf Event
Charity=Charity Event
Commodities=Commodities
Other=Other
and then use a Custom Code box like this (I'm assuming that the drop-down name is 'event_interests')
- Code: Select all
<?php
$list_map = array (
'Fashion' => '2',
'Themed' => '3',
'Music' => '4',
'Movie' => '5',
'Golf' => '9',
'Charity' => '9',
'Commodities' => '3',
'Other' => '9'
);
$subscription = array();
foreach ( $form->data['event_interests'] as $d ) {
$subscription[] = $list_map[$d];
}
// remove duplicate entries
if ( count($subscription) ) {
$subscription = array_unique($subscription);
}
$form->data['subscription'] = $subscription;
?>
cURL Params/Fields Map:
- Code: Select all
subscription={subscription}
user[name]={name}
user[email]={email}
ctrl=sub
task=optin
option=com_acymailing
By all means email or PM me the site URL and a SuperAdmin login and I'll take a quick look.
Bob