Skip to main content

WYSIWYG

A rich text editor field that provides a "What You See Is What You Get" (WYSIWYG) interface, allowing users to format text with various styles and media.

Screenshots

Field render in form:

field preview

Field render in field group:

field preview

Configuration

  • Settings:

    • Name: The label for the field.
    • Slug: The unique technical identifier.
    • Default value: Default content for the field.
    • Translatable: Determines if the field content can be translated into multiple languages.
  • Validation:

    • Require: Determines if the field must be filled out.
    • Min length: The minimum number of characters allowed.
    • Max length: The maximum number of characters allowed.
  • Design:

    • Instructions: Text displayed alongside the field providing details about the data needed.
    • Width: The width of the field in the form.
    • Classes: Custom CSS classes for styling the field.
    • ID: Custom ID attribute for the field.
    • Text before: Additional text displayed before the field.
    • Text after: Additional text displayed after the field.

Return format

  • Type: string or null
  • Note: If the field is translatable, the field returns a single string depending on the context language.

Usage

Usage

/some-template.tpl
{* Object or Entity and Id *}
{assign var="data" value=$modules.customfieldgroups.data->get($product)}
{assign var="data" value=$modules.customfieldgroups.data->get('product', $product.id)}

<span>
{$data.field_group_slug.field_slug nofilter}
</span>
/SomeClass.php
function someMethod()
{
$dataRetriever = DataRetrieverFacade::getInstance();

$data = $dataRetriever->get($object); // Object
$data = $dataRetriever->get('product', $idProduct); // Entity and id

$value = $data['field_group_slug']['field_slug'];
}