adding fields to edit add contact form in admin
authorSteve Sutton <steve@gaslightmedia.com>
Fri, 6 Mar 2015 20:44:05 +0000 (15:44 -0500)
committerSteve Sutton <steve@gaslightmedia.com>
Fri, 6 Mar 2015 20:44:05 +0000 (15:44 -0500)
Toolkit/Contacts/Admin/EditContact.php

index 9ac7a12..f11e72e 100644 (file)
@@ -411,6 +411,10 @@ class Toolkit_Contacts_Admin_EditContact
        public function configureElements()
        {
                $e = array();
+        $config     = parse_ini_file(BASE .'Toolkit/Contacts/config.ini', true);
+        $referredBy = $config['referred_by'];
+        $gender     = $config['gender'];
+        $handicap   = $config['handicap'];
                $this->setInterestFields();
                //      Grouped Elements are defined here.
                $this->interestsGroups =& $this->getInterestFields();
@@ -548,10 +552,24 @@ class Toolkit_Contacts_Admin_EditContact
             'type'    => 'advcheckbox',
             'req'     => false,
             'name'    => 'golfvacation',
-            'display' => '',
-            'opts'    => 'Golf Vacation Planner',
+            'display' => 'Golf Vacation Planner',
+            'opts'    => 'Yes',
             'val'     => array(0, 1)
         );
+        $e[] = array(
+            'type'    => 'select',
+            'req'     => false,
+            'name'    => 'gender',
+            'display' => 'Gender',
+            'opts'    => $gender
+        );
+        $e[] = array(
+            'type'    => 'select',
+            'req'     => false,
+            'name'    => 'handicap',
+            'display' => 'Do you have a USGA Handicap',
+            'opts'    => $handicap
+        );
         if (is_array($this->interestsGroups)) {
             foreach ($this->interestsGroups as $group => $gData) {
                 $this->myGroups[] = $gData;