Admin Only: Registration Form Customizations

2019 Documentation Preview

cover page of 2019 Planning Workbook and Setup GuideThe 2019 Planning Workbook and Setup Guide draft preview is now available for download.  This printable 82-page guide contains everything you need to know to plan, build, and support your BookPoints application.  Once this documentation is finalized, we'll update the website documentation to reflect this year's changes.  Feedback is welcome - please submit documentation feedback using the "Support" button in the bottom right corner of the screen.


If you're not sure what these are, please request customization assistance via email or support ticket!

*** CUSTOM PANE CSS FIX

.pane-custom .block-inner h2.block-title, 

.pane-custom .block-inner .block-content { padding: 20px;}

*** HIDE ACTIVITY WIDGET (BUT PRESERVE POINTS & CODE):

div#reader-dashboard div#activities-block h3 { display: none; }

div#reader-dashboard div#activities-block div#activities-panel { display: none; }

***** MAKE SCHOOL DROPDOWN

 $step1['school']=array(

        '#type' => 'select',

        '#title' => t('School'),

        '#options' => get_ents('school'),

        '#description'=>t('Select the school last attended.')

        );

Comment out the validation function logic for schools!!!!

Also change field_wrapper code to:

$wrapper->field_reader_school = $finalformvalues['school'];

***** MAKE SCHOOL OPTIONAL (2018)

galecia_profile_builder.module line 184

comment out  form_set_error('school', t('You must enter a school from the autocomplete list'));

***** HIDE SCHOOL (2017)

* add School "No School Selected"

* add CSS:

div.form-item-school { display: none; }

* change galecia_profile_builder.module line 108 (autocomplete in step1 array) to:

 '#value' => "No School Selected",

***** HIDE AGE (only available to server admins; request via email if necessary):

* in file galecia_profile_builder.module  

patch ~/MODIFIED/force_reader_age.patch

1) cd /var/www/vhosts/SITENAME.bookpoints.org/public_html/sites/all/modules/custom/galecia_profile_builder

2) sudo patch < ~/MODIFIEDS/force_reader_age.patch

* add CSS:

div.form-item-age { display: none; }

***** MAKE AGE OPTIONAL:

 if (empty($form_state['storedvalues'][0]['age'])) {
                $age=0;
     }

* COMMENT OUT:

  if (!is_numeric($age)) {

            form_set_error('age', t('You must use a number for the age'));

 

        }

* Add "if" clause if (!empty($finalformvalues['age'])) {
around         $wrapper->field_age = $finalformvalues['age'];


***** MAKE GRADE REQUIRED

 Add :

    $grade=$form_state['values']['grade'];

(above and below :: if step==0 line)

if (empty($grade)) {

                form_set_error('grade', t('Grade is required.'));

 

        }


***** HIDE GRADE:

* add CSS:

div.form-item-grade { display: none; }

***** MAKE READER PROFILE: FIRST & LAST NAME REQUIRED

 $first_name=$form_state['values']['first_name'];
<     $last_name=$form_state['values']['last_name'];
< 
174,181d170
<         if (empty($first_name)) {
<             form_set_error('first_name', t('First name is required.'));
<         }
< 
<         if (empty($last_name)) {
<             form_set_error('last_name', t('Last name is required.'));
<         }

 

*****