Skip to content

User Custom Fields

Overview

User Custom Fields allow you to extend the default user profile with additional custom information. You can create various field types to collect extra data during registration or user profile updates, and control their visibility based on user roles.

Purpose

  • Extend User Profiles: Add custom fields beyond the default user attributes
  • Flexible Data Collection: Support multiple field types (text, number, file, dropdown, etc.)
  • Role-Based Visibility: Show fields only to specific user roles
  • Registration Forms: Include custom fields in the user registration process
  • Profile Management: Display custom fields in user profile pages
  • Validation Control: Set fields as required or unique as needed

Accessing User Custom Fields

Navigate to: User Management > User Custom Fields from the sidebar

List View

User Custom Fields List

The list view displays all custom fields with the following columns:

Table Columns

  • Name: The unique identifier for the field (used in code/database)
  • Label: The translatable display label shown to users
  • Type: Field type badge (Text Field, Multi-line Text, Number, File, Dropdown, Yes/No, Checkbox)
  • Required: Click icon to toggle whether the field is mandatory
  • Unique: Click icon to toggle whether values must be unique across all users
  • Registration: Click icon to toggle visibility in registration form
  • Profile: Click icon to toggle visibility in user profile page
  • Roles: Shows which roles can see this field (displays "All Users" if no specific roles selected)
  • Sort Order: Numeric order for field display
  • Disabled: Click icon to toggle field status
  • Actions: Edit and Delete buttons

Quick Actions in List View

You can quickly toggle boolean settings by clicking directly on the icons in these columns: - Required - Unique - Registration (Show in Registration) - Profile (Show in User Profile) - Disabled

Search and Filters

  • Search: Search by field name or label
  • Filter Options:
  • Type: Filter by field type (Text Field, Multi-line Text, Number, etc.)
  • Required: Filter by required status
  • Show in Registration: Filter fields shown in registration
  • Show in User Profile: Filter fields shown in profile
  • Disabled: Filter by enabled/disabled status

Bulk Actions

  • Delete: Remove multiple custom fields at once
  • Export: Export selected fields to Excel/CSV

Creating/Editing User Custom Fields

Create User Custom Field

Basic Information

Name Required

  • Unique identifier for the field
  • Used in code and database
  • Format: lowercase, no spaces (e.g., bio, newsletter_subscription, vendor_application)
  • Maximum length: 50 characters
  • Must be unique across all custom fields
  • Cannot be changed after creation (managed by database constraints)

Label Required

  • Translatable: Can be set in multiple languages
  • Display name shown to users in forms
  • Maximum length: 250 characters
  • Examples: "Biography", "Newsletter Subscription", "Vendor Application Document"

Type Required

  • Text Field: Single-line text input
  • Multi-line Text: Textarea for longer text content
  • Number: Numeric input field
  • File: File upload field (configure allowed file types)
  • Dropdown: Select from predefined options (configure dropdown options)
  • Yes/No: Boolean toggle/switch
  • Checkbox: Checkbox input

Sort Order

  • Controls the display order of fields
  • Lower numbers appear first
  • Default: 0
  • Useful for organizing multiple custom fields in a logical sequence

Field Configuration

This section shows different options based on the selected field Type.

For File Type

Allowed File Types: Select which file types users can upload - Image: Image files (JPEG, PNG, GIF, etc.) - Video: Video files - Document: Document files (PDF, DOC, etc.)

Example: For a "Vendor Application" field, you might only allow Document types.

For Dropdown Type

Dropdown Options: Define the available options - Label: Display text shown to users - Value: Internal value stored in database - Add multiple options using the "Add Option" button - Options are collapsible for better organization - Can reorder options by dragging

Field Settings

Required

  • Toggle to make the field mandatory
  • Users must fill this field when it's displayed
  • Validation enforced on form submission

Unique

  • Toggle to ensure field values are unique across all users
  • Prevents duplicate values
  • Example: Use for fields like "Employee ID" or "License Number"

Show in Registration

  • Toggle to display this field in the user registration form
  • Allows collecting extra information during signup
  • Example: Newsletter subscription preference during registration

Show in User Profile

  • Toggle to display this field in the user profile page
  • Users can view and edit this field in their profile
  • Example: Biography, social media links, preferences

Disabled

  • Toggle to temporarily disable the field without deleting it
  • Disabled fields won't be shown in registration or profile forms
  • Useful for seasonal or conditional fields

Role Permissions

Roles

  • Multi-select dropdown: Choose which user roles can see this field
  • Leave empty: Field is visible to all users
  • Select specific roles: Field only shown to users with selected roles
  • Preloaded options: All available roles are loaded for selection

Example Use Cases: - Vendor-specific fields visible only to users with "vendor" role - Admin fields visible only to "admin" or "super-admin" roles - Customer-specific fields visible only to "customer" role

Common Use Cases

Example 1: Biography Field

  • Name: bio
  • Label: Biography / السيرة الذاتية
  • Type: Multi-line Text
  • Show in Profile: ✓
  • Show in Registration: ✗
  • Roles: All Users

Example 2: Newsletter Subscription

  • Name: newsletter_subscription
  • Label: Newsletter Subscription / الاشتراك في النشرة الإخبارية
  • Type: Yes/No
  • Required: ✗
  • Show in Registration: ✓
  • Show in Profile: ✓
  • Roles: All Users

Example 3: Vendor Application Document

  • Name: vendor_application
  • Label: Vendor Application Document / وثيقة طلب البائع
  • Type: File
  • Allowed File Types: Document
  • Required: ✓
  • Show in Registration: ✓
  • Roles: vendor (only visible to vendor role)

Important Notes

Field Name Guidelines

  • Use descriptive, lowercase names without spaces
  • Use underscores for multi-word names (e.g., driver_license)
  • Keep names concise but meaningful
  • Plan ahead - field names cannot be changed after creation

Translatable Fields

  • Label is translatable and can be set in multiple languages
  • Switch locale using the locale dropdown to edit translations
  • Ensure all active languages have label translations

Field Types Selection

Choose the appropriate field type based on your data requirements: - Text Field: Short text (name, title, URL) - Multi-line Text: Long text (bio, description, address) - Number: Numeric values (age, employee ID) - File: Documents or media uploads - Dropdown: Fixed set of options (country, department) - Yes/No: Boolean decisions (opt-in, preferences) - Checkbox: Multiple selections or confirmations

Validation Considerations

  • Required fields: Ensure they're necessary - users cannot proceed without filling them
  • Unique fields: Use sparingly - only for truly unique identifiers
  • File uploads: Consider file size limits and storage implications

Performance Tips

  • Don't create too many custom fields - each field adds to form complexity
  • Use Sort Order to group related fields logically
  • Disable unused fields instead of deleting them to preserve historical data
  • Use role-based visibility to reduce form clutter for different user types

Role-Based Access

  • Fields with no roles selected are visible to ALL users (including guests during registration)
  • Fields with specific roles are only visible when a user has at least one of the selected roles
  • Consider the user journey: registration fields should work for non-authenticated users

Form Actions

Create

  • Saves the custom field and returns to the list view
  • Field becomes immediately available in registration/profile forms (if enabled)

Create & Create Another

  • Saves the custom field and stays on the form to create another
  • Useful when adding multiple custom fields in sequence

Cancel

  • Discards changes and returns to the list view
  • No data is saved

Custom Actions

Edit

  • Click the "Edit" button in the Actions column
  • Modify field settings (except the name field)
  • All settings can be changed except the unique identifier name

Delete

  • Click the "Delete" button in the Actions column
  • Confirmation dialog appears before deletion
  • Warning: Deleting a field will remove all stored values for that field from all users
  • Consider disabling instead of deleting if you want to preserve data

Best Practices

  1. Plan Your Fields: Think carefully about what information you need before creating fields
  2. Use Descriptive Names: Make field names meaningful for future maintenance
  3. Organize with Sort Order: Group related fields together with sequential sort orders
  4. Minimize Required Fields: Only mark truly essential fields as required
  5. Test Registration Flow: After adding registration fields, test the registration process
  6. Use Role Visibility Wisely: Don't show vendor-specific fields to all users
  7. Document Custom Fields: Keep internal documentation of custom field purposes
  8. Regular Audits: Periodically review and clean up unused custom fields
  9. Consider Mobile Users: Keep forms concise - mobile users prefer shorter forms
  10. Provide Helper Text: Use translatable labels to guide users on what information to provide