Skip to content

Divi 5 custom module fields: select defaults not visible and range values shown as px #756

@abrahamfariazARG

Description

@abrahamfariazARG

Environment:

  • WordPress: 6.9.1
  • Divi 5: beta 9.3
  • Plugin: custom extension module (JS-based, registerModule)

Problem:
In Visual Builder, custom module fields behave inconsistently:

  1. divi/select fields render blank (no selected label visible), even with defaults configured.
  2. divi/range fields show values as "0px/1px" for logical numeric controls (e.g., slides/items), and persistence is inconsistent.

Expected:

  • Select fields show default option label immediately in new module instances.
  • Range fields behave as pure numeric sliders (no px unit for non-dimensional controls).

Actual:

  • Select shows empty UI in some fields.
  • Range shows px and sometimes does not keep logical numeric behavior.

Minimal schema used:

{
  "navigation": {
    "type": "string",
    "default": "autoplay",
    "settings": {
      "innerContent": {
        "item": {
          "attrName": "navigation",
          "component": {
            "name": "divi/select",
            "type": "field",
            "props": {
              "defaultValue": "autoplay",
              "options": {
                "autoplay": { "label": "Autoplay" },
                "dots": { "label": "Dots" },
                "arrows": { "label": "Arrows" }
              }
            }
          }
        }
      }
    }
  },
  "slides_to_scroll": {
    "type": "number",
    "default": 1,
    "settings": {
      "innerContent": {
        "item": {
          "attrName": "slides_to_scroll",
          "component": {
            "name": "divi/range",
            "type": "field",
            "props": { "min": 1, "max": 5, "step": 1, "defaultValue": 1 }
          }
        }
      }
    }
  }
}

Question:

What is the canonical schema for divi/select options and default handling in Divi 5?
For non-dimensional numeric controls, what is the recommended field type/schema to avoid px serialization?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions