|
VirtueMart
3.2.14.9808
|
Return an array with userFields in several formats.
public
| $_selection | An array, as returned by getuserFields(), with fields that should be returned. |
| $_userData | Array with userdata holding the values for the fields |
| $_prefix | string Optional prefix for the formtag name attribute |
// 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";
}
?>
1.8.11