VirtueMart  3.2.14.9808
This

Return an array with userFields in several formats.

public

Parameters
$_selectionAn array, as returned by getuserFields(), with fields that should be returned.
$_userDataArray with userdata holding the values for the fields
$_prefixstring Optional prefix for the formtag name attribute
Author
Oscar van Eijk
Returns
array List with all userfield data in the format: array( 'fields' => array( // All fields <fieldname> => array( 'name' => // Name of the field 'value' => // Existing value for the current user, or the default 'title' => // Title used for label and such 'type' => // Field type as specified in the userfields table 'hidden' => // True/False 'required' => // True/False. If True, the formcode also has the class "required" for the Joomla formvalidator 'formcode' => // Full HTML tag ) [...] ) 'functions' => array() // Optional javascript functions without <script> tags. // Possible usage: if (count($ar('functions')>0) echo '<script ...>'.join("\n", $ar('functions')).'</script>; 'scripts' => array( // Array with scriptsources for use with JHtml::script(); <name> => <path> [...] ) 'links' => array( // Array with stylesheets for use with JHtml::stylesheet(); <name> => <path> [...] ) ) example illustrates the use of this function. For additional examples, see the Order view and the User view in the administrator section.
  // In the controller, make sure this model is loaded.
  // In view.html.php, make the following calls:
  $_usrDetails = getUserDetailsFromSomeModel(); // retrieve an user_info record, eg from the usermodel or ordermodel
  $_usrFieldList = $userFieldsModel->getUserFields(
                   'registration'
                 , array() // Default switches
                 , array('delimiter_userinfo', 'username', 'email', 'password', 'password2', 'agreed', 'address_type') // Skips
   );
  $usrFieldValues = $userFieldsModel->getUserFieldsFilled(
                     $_usrFieldList
                    ,$_usrDetails
  );
  $this-userfields= $userfields;
  // In the template, use code below to display the data. For an extended example using
  // delimiters, JavaScripts and StyleSheets, see the edit_shopper.php in the user view
  
        
           <?php echo vmText::_('COM_VIRTUEMART_TABLE_HEADER') ?>
        
      
    </thead>
     <?php
       foreach ($this->shipmentfields['fields'] as $_field ) {
         echo '  
'."\n";
         echo '    
'."\n";
         echo '      '.$_field['title']."\n";
         echo '    '."\n";
         echo '    
'."\n";
         echo '      '.$_field['value']."\n";    // Display only
      Or:
         echo '      '.$_field['formcode']."\n"; // Input form
         echo '    '."\n";
         echo '  '."\n";
       }
     ?>