# betterdocs/2.5.5/includes/Editors/BlockEditor/Blocks/SearchForm.php

BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ &amp; Chatbot, version 2.5.5. 48 lines.

- Page: https://pluginprobe.com/plugins/betterdocs/2.5.5/code/includes/Editors/BlockEditor/Blocks/SearchForm.php
- Raw: https://pluginprobe.com/plugins/betterdocs/2.5.5/raw/includes/Editors/BlockEditor/Blocks/SearchForm.php
- Modified: 2023-08-24T08:13:26+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/betterdocs/2.5.5/code/includes/Editors/BlockEditor/Blocks/SearchForm.php#L10-L20`.

```php
<?php

namespace WPDeveloper\BetterDocs\Editors\BlockEditor\Blocks;

use WPDeveloper\BetterDocs\Editors\BlockEditor\Block;

class SearchForm extends Block {
    public $view_wrapper = 'betterdocs-searchbox-wrapper';

    protected $frontend_styles = [
        'betterdocs-search'
    ];
    protected $frontend_scripts = [
        'betterdocs-search'
    ];

    /**
     * unique name of block
     * @return string
     */
    public function get_name() {
        return 'searchbox';
    }

    public function get_default_attributes() {
        return [
            'blockId'         => '',
            'placeholderText' => __( 'Search', 'betterdocs' )
        ];
    }

    public function render( $attributes, $content ) {
        $this->views( 'widgets/search-form' );
    }

    public function view_params() {
        $settings = &$this->attributes;

        $_shortcode_attributes = apply_filters( 'betterdocs_elementor_search_form_params', [
            'placeholder' => esc_html( $settings['placeholderText'] )
        ], $this->attributes );

        return [
            'shortcode_attr' => $_shortcode_attributes
        ];
    }
}

```
