Skip to content

Default Value for Height and Width #34

@moccassins

Description

@moccassins

The Title says it all, how can I provide a different default value than "auto" for my Module? I tried it multiple times with different approaches and also asked several AI Tools for help without success. I can't even change the default description of the Width and Height setting. So how can I do that?

Thats one of my tries:

// Define the fields that the module will accept.
    public function get_fields()
    {
        return array(
            // Width attribute
            'width' => array(
                'label' => esc_html__('Breite', 'et_builder'),
                'type' => 'text',
                'option_category' => 'layout',
                'description' => esc_html__('Geben Sie die gewünschte Breite ein.', 'et_builder'),
                'default' => '200px',
                'toggle_slug' => 'size',
            ),
            // Height attribute
            'height' => array(
                'label' => esc_html__('Höhe', 'et_builder'),
                'type' => 'text',
                'option_category' => 'design',
                'description' => esc_html__('Geben Sie die gewünschte Höhe ein.', 'et_builder'),
                'default' => '300px',
                'toggle_slug' => 'size',
            ),
        );
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions