Difference between revisions of "Functions:userAccountAndAddressCreate"
From Whirlwind eCommerce Wiki
(New page: == Description == Controls a new user/address form, adds a new user/address. Use this function to build a 'create account' page. == Syntax == $accountArray = eV::userAccountAndAddressCrea...) |
|||
| Line 7: | Line 7: | ||
== Paramaters == | == Paramaters == | ||
*$fieldList STRING | *$fieldList STRING | ||
| − | :: comma separated list of fields to be managed by the form | + | :: comma separated list of fields to be managed by the form. The listed fields in $fieldList can be complimented with the following field controls: |
| + | ::*/min:#:message | ||
| + | ::*/max:#:message | ||
| + | ::*/default:value | ||
| + | ::*/email:message | ||
| + | ::*/unique:message | ||
*$redirect STRING | *$redirect STRING | ||
:: URL where visitor will be forwarded to following a successful form submission | :: URL where visitor will be forwarded to following a successful form submission | ||
== Return Values == | == Return Values == | ||
| − | Multidimensional array of field values and error messages: | + | Multidimensional array of field values and error messages containing [message]: a string containing any error messages that prohibited the form data from being submitted, and [values]: a keyed array of fields and their values. Note that only fields specified in the $fieldList attribute will be contained in the [value] array: |
<pre> | <pre> | ||
Revision as of 03:16, 5 November 2008
Description
Controls a new user/address form, adds a new user/address. Use this function to build a 'create account' page.
Syntax
$accountArray = eV::userAccountAndAddressCreate($fieldList,$redirect);
Paramaters
- $fieldList STRING
- comma separated list of fields to be managed by the form. The listed fields in $fieldList can be complimented with the following field controls:
- /min:#:message
- /max:#:message
- /default:value
- /email:message
- /unique:message
- comma separated list of fields to be managed by the form. The listed fields in $fieldList can be complimented with the following field controls:
- $redirect STRING
- URL where visitor will be forwarded to following a successful form submission
Return Values
Multidimensional array of field values and error messages containing [message]: a string containing any error messages that prohibited the form data from being submitted, and [values]: a keyed array of fields and their values. Note that only fields specified in the $fieldList attribute will be contained in the [value] array:
Array
(
[message] => STRING
[values] => ARRAY
(
//Address Fields
[address_firstName] => STRING
[address_lastName] => STRING
[address_company] => STRING
[addressName] => STRING
[street1] => STRING
[street2] => STRING
[city] => STRING
[state] => STRING
[state_alt] => STRING
[zipCode] => STRING
[country] => STRING
[phone1] => STRING
[phone2] => STRING
[phone3] => STRING
[fax] => STRING
//User Account Fields
[firstName] => STRING
[lastName] => STRING
[password] => STRING
[passwordConfirm] => STRING
[userNotes] => STRING
[company] => STRING
[title] => STRING
//Custom Fields
[custom_field_...] => STRING
...
)
)
Examples
- example 1
example 1 goes here
- example 2
example 2 goes here