Profile Field
The profile field service is for listing, creating and alteration of profile fields.
fetchAll
array profile_field.fetchAll( int profileId )
Requests a list of profile fields for the given profile ID.
Return Values
Returns an array of associative arrays. For the possible returned elements see #find
find
array profile_field.find( int fieldId )
Requests the profile field details for the given field ID.
Parameters
profileId
ID of the field you're requesting.
Return Values
Returns an associative array. The possible returned elements are as follows:
Name | Type | Description |
---|---|---|
profile_id | int | ID of the profile that contains this field |
field_id | int | Field ID |
name | string | Name of the field |
type_id | int | ID of the field type, see Field_Type |
sort_order | int |
|
insert
int profile_field.insert( array data )
Inserts a new field into the specified profile.
Parameters
data
Name | Required | Type | Description |
---|---|---|---|
name | yes | string | The name of the field |
profile_id | yes | int | The profile under which this field will be created |
type_id | yes | int | ID of the field type, see Field_Type |
Resource Limit
The number of Profile Fields allowed in the system is limited to 50. This method will return an error if this is exceeded.
Return Values
Returns an int type. The ID of the newly created field.
update
bool profile_field.update( int fieldId, array data )
Updates an existing field using the data specified.
Parameters
fieldId
The existing field id to be updated.
data
Name | Required | Type | Description |
---|---|---|---|
name | no | string | New name for the profile field |
If you wish to change the profile field type, the field will need to be deleted and inserted again with the correct type_id
Return Values
Returns a bool. True on success.
delete
int profile_field.delete( int fieldId )
Deletes the specified profile field.
If a field is deleted, all recipient data stored in this field will be lost.
Parameters
fieldId
ID of the field you want to delete.
Return Values
Returns a bool. True on success.
Service
profile_field
Methods