function scs_node_selection_submit in Simplenews Content Selection 6
Same name and namespace in other branches
- 6.2 scs.pages.inc \scs_node_selection_submit()
- 7 scs.module \scs_node_selection_submit()
File
- ./
scs.pages.inc, line 41
Code
function scs_node_selection_submit($form, &$form_state) {
//Get the selected nodes
$nodes = array();
$title = $form_state['values']['newsletter_title'];
foreach ($form_state['values'] as $field => $value) {
if (ereg('nid_', $field) && $value == 1) {
$nid = explode('_', $field);
$nodes[] = $nid[1];
}
}
_scs_create_newsletter($title, $nodes);
}