Uncaught TypeError: Cannot read property 'title' of undefined

Uncaught TypeError: Cannot read property 'title' of undefined

Hi there,
I am using the plugin "multipage" - and I'm using it on an install of Magento Enterprise for the user registration account page.

I have seem to set everything up correctly, But it looks as though it's just not working for me. here is the page:

http://dev.domainindustries.com/customer/account/create/

Here is the error being thrown:






  1. Uncaught TypeError: Cannot read property 'title' of undefined jquery.multipage.js:68
    1. jQuery.fn.gotopage jquery.multipage.js:68
    2. jQuery.fn.multipage jquery.multipage.js:237
    3. (anonymous function)

I can't figure out of that's causing multipage to work or not. 

Here is my page head code:
  1. <head>
  2. <?php echo $this->getChildHtml('head') ?>
  3. <script type="text/javascript" src="<?php echo $this->getJsUrl('multipage/jquery.multipage.js') ?>"></script>
  4. <script type="text/javascript">
  5.                 jQuery.noConflict();
  6. jQuery('#myform').multipage({transitionFunction:transition,hideLegend: true,stateFunction: textpages});

  7. function transition(from,to) {
  8. jQuery(from).fadeOut('fast',function(){$(to).fadeIn('fast');});
  9. }
  10. function textpages(obj,page,pages) { 
  11. jQuery(obj).html(page + ' of ' + pages);
  12. }
  13. </script>
  14. </head>

and my form code:

  1. <div class="account-create">
  2.    <!--<div class="page-title">
  3.         <h1><?php echo $this->__('Create an Account') ?></h1>
  4.     </div>-->
  5. <div class="StaticsBlockBanner">
  6. <?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('register-static-block')->toHtml(); ?>

  7. </div>
  8. <div class="RegisterField">
  9.     <?php echo $this->getChildHtml('form_fields_before')?>
  10.     <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
  11.     <form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="form-validate" enctype="multipart/form-data">
  12.     <fieldset id="page_one">
  13.         <div class="fieldset">
  14.             <input type="hidden" name="success_url" value="<?php echo $this->getSuccessUrl() ?>" />
  15.             <input type="hidden" name="error_url" value="<?php echo $this->getErrorUrl() ?>" />
  16.             <input type="hidden" name="is_subscribed" value="1" id="is_subscribed"  />
  17.             <h2 class="legend"><?php echo $this->__('Personal Information') ?></h2>
  18.             <ul class="form-list">
  19. <li class="fields">

  20.                         <label for="company"><?php echo $this->__('Company') ?></label>
  21.                         <div class="input-box">
  22.                             <input type="text" name="company" id="company" value="<?php echo $this->htmlEscape($this->getFormData()->getCompany()) ?>" title="<?php echo $this->__('Company') ?>" class="input-text" />
  23.                         </div>
  24.                     </li>
  25.                   <li class="fields">
  26.                 <?php echo $this->getLayout()->createBlock('customer/widget_name')->setObject($this->getFormData())->toHtml() ?></li>
  27.                 
  28.                  <li class="fields">
  29.                     <label for="email_address" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
  30.                     <div class="input-box">
  31.                         <input type="text" name="email" id="email_address" value="<?php echo $this->htmlEscape($this->getFormData()->getEmail()) ?>" title="<?php echo $this->__('Email Address') ?>" class="input-text validate-email required-entry" />
  32.                     </div>
  33.                 </li>
  34. <li class="fields">

  35.                         <label for="telephone" class="required"><em>*</em><?php echo $this->__('Telephone') ?></label>
  36.                         <div class="input-box">
  37.                             <input type="text" name="telephone" id="telephone" value="<?php echo $this->htmlEscape($this->getFormData()->getTelephone()) ?>" title="<?php echo $this->__('Telephone') ?>" class="input-text required-entry" />
  38.                         </div>
  39.                   
  40.                 </li>
  41.                
  42.             <?php $_dob = $this->getLayout()->createBlock('customer/widget_dob') ?>
  43.             <?php if ($_dob->isEnabled()): ?>
  44.                 <li><?php echo $_dob->setDate($this->getFormData()->getDob())->toHtml() ?></li>
  45.             <?php endif ?>
  46.             <?php $_taxvat = $this->getLayout()->createBlock('customer/widget_taxvat') ?>
  47.             <?php if ($_taxvat->isEnabled()): ?>
  48.                 <li><?php echo $_taxvat->setTaxvat($this->getFormData()->getTaxvat())->toHtml() ?></li>
  49.             <?php endif ?>
  50.             <?php $_gender = $this->getLayout()->createBlock('customer/widget_gender') ?>
  51.             <?php if ($_gender->isEnabled()): ?>
  52.                 <li><?php echo $_gender->setGender($this->getFormData()->getGender())->toHtml() ?></li>
  53.             <?php endif ?>
  54.            
  55.             </ul>
  56.             
  57.         </div>
  58.     </fieldset>
  59.     <fieldset id="page_two">       
  60.     <?php //if($this->getShowAddressFields()): ?>
  61.         <div class="fieldset">
  62.             <input type="hidden" name="create_address" value="1" />
  63.             <h2 class="legend"><?php echo $this->__('Address Information') ?></h2>
  64.             <ul class="form-list">
  65.                
  66.                     
  67.                     
  68.                 <li class="wide">
  69.                     <label for="street_1" class="required"><em>*</em><?php echo $this->__('Street Address') ?></label>
  70.                     <div class="input-box">
  71.                         <input type="text" name="street[]" value="<?php echo $this->htmlEscape($this->getFormData()->getStreet(0)) ?>" title="<?php echo $this->__('Street Address') ?>" id="street_1" class="input-text required-entry" />
  72.                     </div>
  73.                 
  74.             <?php for ($_i=2, $_n=$this->helper('customer/address')->getStreetLines(); $_i<=$_n; $_i++): ?>
  75.                 <div class="Clear" style="height:10px;"></div>
  76. <label for="street_2"><?php echo $this->__('Street Address 2') ?></label>
  77.                     <div class="input-box">
  78.                         <input type="text" name="street[]" value="<?php echo $this->htmlEscape($this->getFormData()->getStreet($_i - 1)) ?>" title="<?php echo $this->__('Street Address '.$_i) ?>" id="street_<?php echo $_i?>" class="input-text" />
  79.                     </div>
  80.                 
  81.             <?php endfor ?>
  82.             </li>
  83.                 <li class="fields">
  84. <div class="field2">
  85.                         <label for="city" class="required"><em>*</em><?php echo $this->__('City') ?></label>
  86.                         <div class="input-box">
  87.                             <input type="text" name="city" value="<?php echo $this->htmlEscape($this->getFormData()->getCity()) ?>" title="<?php echo $this->__('City') ?>" class="input-text required-entry" id="city" />
  88.                         </div>
  89. </div>
  90. <div class="field2">
  91.                         <label for="region_id" class="required"><em>*</em><?php echo $this->__('State/Province') ?></label>
  92.                         <div class="input-box">
  93.                             <select id="region_id" name="region_id" title="<?php echo $this->__('State/Province') ?>" class="validate-select" style="display:none;">
  94.                                 <option value=""><?php echo $this->__('Please select region, state or province') ?></option>
  95.                             </select>
  96.                             <script type="text/javascript">
  97.                             //<![CDATA[
  98.                                 $('region_id').setAttribute('defaultValue',  "<?php echo $this->getFormData()->getRegionId() ?>");
  99.                             //]]>
  100.                             </script>
  101.                             <input type="text" id="region" name="region" value="<?php echo $this->htmlEscape($this->getRegion()) ?>" title="<?php echo $this->__('State/Province') ?>" class="input-text"  />
  102.                         </div>
  103. </div>
  104.                 </li>
  105.                 
  106.                 
  107.                 <li class="fields">
  108.                     <div class="field2">
  109.                         <label for="zip" class="required"><em>*</em><?php echo $this->__('Zip/Postal Code') ?></label>
  110.                         <div class="input-box">
  111.                             <input type="text" name="postcode" value="<?php echo $this->htmlEscape($this->getFormData()->getPostcode()) ?>" title="<?php echo $this->__('Zip/Postal Code') ?>" id="zip" class="input-text validate-zip-international required-entry" />
  112.                         </div>
  113.                   </div>
  114.  <div class="field2">
  115.                         <label for="country" class="required"><em>*</em><?php echo $this->__('Country') ?></label>
  116.                         <div class="input-box">
  117.                             <?php echo $this->getCountryHtmlSelect() ?>
  118.                         </div>
  119. </div>
  120.                 </li>
  121.                 <?php $addressAttributes = $this->getChild('customer_form_address_user_attributes');?>
  122.                 <?php if ($addressAttributes): ?>
  123.                     <?php $addressAttributes->setEntity($this->getAddress());?>
  124.                     <?php $addressAttributes->setFieldIdFormat('address:%1$s')->setFieldNameFormat('address[%1$s]');?>
  125.                     <?php $this->restoreSessionData($addressAttributes->getForm(), 'address');?>
  126.                     <?php echo $addressAttributes->setShowContainer(false)->toHtml()?>
  127.                 <?php endif;?>
  128.             </ul>
  129.             <input type="hidden" name="default_billing" value="1" />
  130.             <input type="hidden" name="default_shipping" value="1" />
  131.         </div>
  132.     </fieldset>
  133.     <fieldset id="page_three">
  134. <div class="fieldset">
  135.              <h2 class="legend"><?php echo $this->__('Login Information') ?></h2>
  136.             <ul class="form-list">
  137.                 <li class="fields">

  138.                         <label for="password" class="required"><em>*</em><?php echo $this->__('Password') ?></label>
  139.                         <div class="input-box">
  140.                             <input type="password" name="password" id="password" title="<?php echo $this->__('Password') ?>" class="input-text required-entry validate-password" />
  141.                     </div>
  142.                     </li>
  143.                     <li class="fields">
  144.                     <div class="field">
  145.                         <label for="confirmation" class="required"><em>*</em><?php echo $this->__('Confirm Password') ?></label>
  146.                         <div class="input-box">
  147.                             <input type="password" name="confirmation" title="<?php echo $this->__('Confirm Password') ?>" id="confirmation" class="input-text required-entry validate-cpassword" />
  148.                         </div>
  149.                     </div>
  150.                 </li>
  151. <!--<?php if ($this->isNewsletterEnabled()): ?>
  152.                 <li class="control">
  153.                     <div class="input-box">
  154.                         <input type="checkbox" name="is_subscribed" title="<?php echo $this->__('Sign Up for Newsletter') ?>" value="1" id="is_subscribed"<?php if($this->getFormData()->getIsSubscribed()): ?> checked="checked"<?php endif; ?> class="checkbox" />
  155.                     </div>
  156.                     <label for="is_subscribed"><?php echo $this->__('Sign Up for Newsletter') ?></label>
  157.                 </li>
  158.                 <?php endif ?>-->
  159. <?php $customerAttributes = $this->getChild('customer_form_user_attributes');?>
  160.             <?php if ($customerAttributes): ?>
  161.                 <?php $customerAttributes->setShowContainer(false);?>
  162.                 <?php $this->restoreSessionData($customerAttributes->getForm());?>
  163.                 <?php echo $customerAttributes->toHtml()?>
  164.             <?php endif;?>
  165.             </ul>
  166. </div>
  167.             </fieldset>
  168.     <?php //endif; ?>
  169.         <!--<div class="fieldset">
  170.            
  171.         </div> -->
  172.         <div class="buttons-set form-buttons">
  173.             <!--<p class="back-link"><a href="<?php echo $this->escapeUrl($this->getBackUrl()) ?>"><small>&laquo; </small><?php echo $this->__('Back') ?></a></p>-->
  174.             <button type="submit" class="button" title="<?php echo $this->__('Submit') ?>"><span><span><?php echo $this->__('Submit') ?></span></span></button>
  175.         </div>
  176. <!--        <p class="required"><?php echo $this->__('* Required Fields') ?></p> -->
  177.     </form>
  178. </div>
  179.     <script type="text/javascript">
  180.     //<![CDATA[
  181.         var dataForm = new VarienForm('form-validate', true);
  182.         new RegionUpdater('country', 'region', 'region_id', <?php echo $this->helper('directory')->getRegionJson() ?>, undefined, 'zip');

  183.         Form.getElements('form-validate').each(function(element) {
  184.             element.setAttribute('autocomplete', 'off');
  185.         });
  186.     //]]>
  187.     </script>
  188. </div>

Please note that I had to run jquery in no conflict mode due to magento's use of prototype. I'm a bit new to this, so any help would be amazing.