function constant_contact_import in Constant Contact 6.3
Same name and namespace in other branches
- 5 constant_contact.module \constant_contact_import()
- 6 constant_contact.module \constant_contact_import()
- 7.3 admin.import.inc \constant_contact_import()
Displays the import page
1 string reference to 'constant_contact_import'
- constant_contact_menu in ./
constant_contact.module - Adds an admin menu for the Cnstant Contact module
File
- ./
admin.import.inc, line 11
Code
function constant_contact_import() {
$cc = constant_contact_create_object();
if (!is_object($cc)) {
return '';
}
$form = array();
$form['#attributes'] = array(
'enctype' => "multipart/form-data",
);
// upload
$form['constant_contact']['import'] = array(
'#type' => 'fieldset',
'#title' => t('Import Subscribers'),
);
$form['constant_contact']['import']['file'] = array(
'#type' => 'file',
'#title' => t('CSV file'),
'#description' => t('Upload a CSV or TXT file containing your subscribers, see <a href="@fileformat" target="_blank">this page</a> for help with formatting the file', array(
'@fileformat' => 'http://constantcontact.custhelp.com/cgi-bin/constantcontact.cfg/php/enduser/std_adp.php?p_faqid=2523',
)),
'#size' => 60,
);
$lists = constant_contact_get_lists($cc);
$form['constant_contact']['import']['lists'] = array(
'#type' => 'select',
'#title' => t('Contact lists'),
'#options' => $lists,
'#multiple' => true,
'#size' => 10,
'#description' => t('Select which contact lists you want to subscribe these users to, you must select at least one list'),
'#required' => true,
);
$form['#redirect'] = 'admin/settings/constant_contact/activities';
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Import'),
);
return $form;
}