Skip to main content

Introduction

The Custom Field Groups module for PrestaShop allows you to add various types of fields to your field groups. Each field can be customized to suit your specific needs. Here’s an overview of the field types and their primary configurations:

Field Types

  • Basic fields

    • Text: A simple text input.
    • Textarea: A larger text input area for multiline text.
    • Email: An input field specifically for email addresses.
    • Number: An input field for numeric values.
    • Boolean: A checkbox for true/false values.
    • Image: An upload field for images.
    • File: An upload field for general files.
    • WYSIWYG: A rich text editor field.
    • Color: A visual selector for color.
    • Date: A calendar selector for date.
    • Choice-Single: A dropdown for a single choice.
    • Choice-Multiple: A list of checkboxes for multiple choices.
  • Relation fields

  • Special fields

    • Group: A container to group multiple fields.
    • Repeater: Allows a set of fields to be repeated multiple times.
    • Flexible-Repeater: Allows a set of fields to be repeated with a choice of field sets.

Required parameters

  • Type: The type of field (e.g., Text, Email, Number).
  • Name: The label displayed to the user in the form.
  • Slug: A unique technical identifier for the field within a field group or subgroup, used to retrieve the data.

Field settings

Each field can be configured with various settings, divided into three main sections:

  • Settings

    • Description: General field configuration parameters.
    • Includes:
      • Name: The label for the field.
      • Slug: The unique technical identifier.
      • Additional settings depend on the field type (e.g., Translatable, Default Value, Choices)
    • Example:
      - Field Type: Text
      - Name: Product additional name
      - Slug: product_additional_name
      - Default Value: null
      - Translatable: Yes
  • Validation

    • Description: Parameters to ensure data integrity.
    • Includes:
      • Required: Whether the field is mandatory.
      • Additional settings depend on the field type (e.g., Min length, Max length, Number min of elements, Maximum size)
    • Example:
      - Required: Yes
      - Min Length: 5
      - Max Length: 100
  • Design

    • Description: Configuration for the field’s appearance.
    • Includes:
      • Input Instructions: Guidelines for the user.
      • Width: Field width in percentage.
      • CSS Classes: Custom CSS classes for styling.
      • ID: Unique HTML ID for the field.
      • Additional Text: Text displayed before or after the field.
      • Additional settings depend on the field type (e.g., Image preview size)
    • Example:
      - Input Instructions: "This field value will be displayed under the product name."
      - Width: 50%
      - CSS Classes: custom-product-name
      - ID: additional-product-name