Function __global->cns_edit_custom_field
Definitions
sources/cns_members_action2.php
- Edit a Custom Profile Field.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $id | AUTO_LINK | No | No | required parameter | N/A | N/A | The ID of the Custom Profile Field |
| $name | SHORT_TEXT | No | No | required parameter | N/A | N/A | Name of the field |
| $description | SHORT_TEXT | No | No | required parameter | N/A | N/A | Description of the field |
| $default | LONG_TEXT | No | No | required parameter | N/A | N/A | The default value for the field |
| $public_view | BINARY | No | No | required parameter | N/A | N/A | Whether the field is publicly viewable |
| $owner_view | BINARY | No | No | required parameter | N/A | N/A | Whether the field is viewable by the owner |
| $owner_set | BINARY | No | No | required parameter | N/A | N/A | Whether the field may be set by the owner |
| $encrypted | BINARY | No | No | required parameter | N/A | N/A | Whether the field should be encrypted |
| $required | BINARY | No | No | required parameter | N/A | N/A | Whether the field is to be shown on the join form |
| $show_in_posts | BINARY | No | No | required parameter | N/A | N/A | Whether this field is shown in posts and places where member details are highlighted (such as an image in a member gallery) |
| $show_in_post_previews | BINARY | No | No | required parameter | N/A | N/A | Whether this field is shown in preview places, such as in the forum member tooltip |
| $order | integer | No | No | required parameter | N/A | N/A | The order of this field relative to other fields |
| $only_group | LONG_TEXT | No | No | required parameter | N/A | N/A | The usergroups that this field is confined to (comma-separated list) |
| $type | ID_TEXT | No | No | required parameter | short_text long_text short_trans long_trans integer upload picture url list tick float | N/A | The type of the field |
| $show_on_join_form | BINARY | No | No | required parameter | N/A | N/A | Whether to show this field for filling in when a member joins the site |
| $options | SHORT_TEXT | No | No | required parameter | N/A | N/A | Field options |
| $include_in_main_search | BINARY | No | No | required parameter | N/A | N/A | Whether to include in main keyword search |
| $allow_template_search | BINARY | No | No | required parameter | N/A | N/A | Whether to allow template search |
| $icon | ID_TEXT | No | No | required parameter | N/A | N/A | An icon to show the CPF with on the member profiles |
| $section | ID_TEXT | No | No | required parameter | N/A | N/A | A section to show with on the member-links part of member profiles |
| $tempcode | LONG_TEXT | No | No | required parameter | N/A | N/A | This is Tempcode that is used for displaying the field. See the DESCRIPTION_CPF_CODE language string. |
| $autofill_type | ID_TEXT | No | No | required parameter | N/A | N/A | Autofill field name from https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill-field |
| $autofill_hint | ID_TEXT | No | No | required parameter | N/A | N/A | Autofill hint: '' or 'shipping' or 'billing' |
Preview
Code (PHP)
/**
* Edit a Custom Profile Field.
*
* @param AUTO_LINK $id The ID of the Custom Profile Field
* @param SHORT_TEXT $name Name of the field
* @param SHORT_TEXT $description Description of the field
* @param LONG_TEXT $default The default value for the field
* @param BINARY $public_view Whether the field is publicly viewable
* @param BINARY $owner_view Whether the field is viewable by the owner
* @param BINARY $owner_set Whether the field may be set by the owner
* @param BINARY $encrypted Whether the field should be encrypted
* @param BINARY $required Whether the field is to be shown on the join form
* @param BINARY $show_in_posts Whether this field is shown in posts and places where member details are highlighted (such as an image in a member gallery)
* @param BINARY $show_in_post_previews Whether this field is shown in preview places, such as in the forum member tooltip
* @param integer $order The order of this field relative to other fields
* @param LONG_TEXT $only_group The usergroups that this field is confined to (comma-separated list)
* @param ID_TEXT $type The type of the field
* @set short_text long_text short_trans long_trans integer upload picture url list tick float
* @param BINARY $show_on_join_form Whether to show this field for filling in when a member joins the site
* @param SHORT_TEXT $options Field options
* @param BINARY $include_in_main_search Whether to include in main keyword search
* @param BINARY $allow_template_search Whether to allow template search
* @param ID_TEXT $icon An icon to show the CPF with on the member profiles
* @param ID_TEXT $section A section to show with on the member-links part of member profiles
* @param LONG_TEXT $tempcode This is Tempcode that is used for displaying the field. See the DESCRIPTION_CPF_CODE language string.
* @param ID_TEXT $autofill_type Autofill field name from https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill-field
* @param ID_TEXT $autofill_hint Autofill hint: '' or 'shipping' or 'billing'
*/
function cns_edit_custom_field(int $id, string $name, string $description, string $default, int $public_view, int $owner_view, int $owner_set, int $encrypted, int $required, int $show_in_posts, int $show_in_post_previews, int $order, string $only_group, string $type, int $show_on_join_form, string $options, int $include_in_main_search, int $allow_template_search, string $icon, string $section, string $tempcode, string $autofill_type, string $autofill_hint)
* Edit a Custom Profile Field.
*
* @param AUTO_LINK $id The ID of the Custom Profile Field
* @param SHORT_TEXT $name Name of the field
* @param SHORT_TEXT $description Description of the field
* @param LONG_TEXT $default The default value for the field
* @param BINARY $public_view Whether the field is publicly viewable
* @param BINARY $owner_view Whether the field is viewable by the owner
* @param BINARY $owner_set Whether the field may be set by the owner
* @param BINARY $encrypted Whether the field should be encrypted
* @param BINARY $required Whether the field is to be shown on the join form
* @param BINARY $show_in_posts Whether this field is shown in posts and places where member details are highlighted (such as an image in a member gallery)
* @param BINARY $show_in_post_previews Whether this field is shown in preview places, such as in the forum member tooltip
* @param integer $order The order of this field relative to other fields
* @param LONG_TEXT $only_group The usergroups that this field is confined to (comma-separated list)
* @param ID_TEXT $type The type of the field
* @set short_text long_text short_trans long_trans integer upload picture url list tick float
* @param BINARY $show_on_join_form Whether to show this field for filling in when a member joins the site
* @param SHORT_TEXT $options Field options
* @param BINARY $include_in_main_search Whether to include in main keyword search
* @param BINARY $allow_template_search Whether to allow template search
* @param ID_TEXT $icon An icon to show the CPF with on the member profiles
* @param ID_TEXT $section A section to show with on the member-links part of member profiles
* @param LONG_TEXT $tempcode This is Tempcode that is used for displaying the field. See the DESCRIPTION_CPF_CODE language string.
* @param ID_TEXT $autofill_type Autofill field name from https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill-field
* @param ID_TEXT $autofill_hint Autofill hint: '' or 'shipping' or 'billing'
*/
function cns_edit_custom_field(int $id, string $name, string $description, string $default, int $public_view, int $owner_view, int $owner_set, int $encrypted, int $required, int $show_in_posts, int $show_in_post_previews, int $order, string $only_group, string $type, int $show_on_join_form, string $options, int $include_in_main_search, int $allow_template_search, string $icon, string $section, string $tempcode, string $autofill_type, string $autofill_hint)

