get('IM_Block_Count')) ? $form->get('IM_Block_Count') : 1; } else { $blockId = $blockCount; } $form->applyFilter('__ALL__', 'trim'); //IM provider select $form->addSelect("im[$blockId][provider_id]", array('entity' => 'im', 'class' => 'eight', 'placeholder' => NULL)); //Block type select $form->addSelect("im[$blockId][location_type_id]", array('entity' => 'im', 'class' => 'eight', 'placeholder' => NULL)); //IM box $form->addElement('text', "im[$blockId][name]", ts('Instant Messenger'), CRM_Core_DAO::getAttribute('CRM_Core_DAO_IM', 'name') ); //is_Primary radio $js = array('id' => 'IM_' . $blockId . '_IsPrimary'); if (!$blockEdit) { $js['onClick'] = 'singleSelect( this.id );'; } $form->addElement('radio', "im[$blockId][is_primary]", '', '', '1', $js); } }