private static Element getDataElement()
    {
        final DataForm searchForm = new DataForm( DataForm.Type.form );
        searchForm.setTitle( "Chat Rooms Search" );
        searchForm.addInstruction( "Instructions" );

        final FormField typeFF = searchForm.addField();
        typeFF.setVariable( "FORM_TYPE" );
        typeFF.setType( FormField.Type.hidden );
        typeFF.addValue( NAMESPACE + "#params" );

        final FormField qFF = searchForm.addField();
        qFF.setVariable( VAR_Q );
        qFF.setType( FormField.Type.text_single );
        qFF.setLabel( "Search for" );
        qFF.setRequired( false );

        final FormField sinnameFF = searchForm.addField();
        sinnameFF.setVariable( VAR_SINNAME );
        sinnameFF.setType( FormField.Type.boolean_type );
        sinnameFF.setLabel( "Search in name?" );
        sinnameFF.setRequired( false );
        sinnameFF.addValue( true );

        final FormField sindescriptionFF = searchForm.addField();
        sindescriptionFF.setVariable( VAR_SINDESCRIPTION );
        sindescriptionFF.setType( FormField.Type.boolean_type );
        sindescriptionFF.setLabel( "Search in description?" );
        sindescriptionFF.setRequired( false );
        sindescriptionFF.addValue( true );

        final FormField sinaddr = searchForm.addField();
        sinaddr.setVariable( VAR_SINDADDR );
        sinaddr.setType( FormField.Type.boolean_type );
        sinaddr.setLabel( "Search in address?" );
        sinaddr.setRequired( false );
        sinaddr.addValue( true );

        final FormField minUsersFF = searchForm.addField();
        minUsersFF.setVariable( VAR_MIN_USERS );
        minUsersFF.setType( FormField.Type.text_single );
        minUsersFF.setLabel( "Minimum number of users" );
        minUsersFF.setRequired( false );
        minUsersFF.addValue( 1 );

        final FormField keyFF = searchForm.addField();
        keyFF.setVariable( VAR_KEY );
        keyFF.setType( FormField.Type.list_single );
        keyFF.setLabel( "Sort results by" );
        keyFF.setRequired( false );
        keyFF.addOption( "Number of online users", Key.nusers.name() );
        keyFF.addOption( "Address", Key.address.name() );
        keyFF.addValue( Key.address.name() );

        final Element result = DocumentHelper.createElement( QName.get( REQUEST_ELEMENT_NAME, NAMESPACE ) );
        result.add( searchForm.getElement() );
        return result;
    }
Utility method that returns a 'search' child element filled
with a blank dataform.

@return Element, named 'search', escaped by the 'https://xmlns.zombofant.net/muclumbus/search/1.0' namespace, filled with a blank dataform.
xmppserver/src/main/java/org/jivesoftware/openfire/muc/spi/IQMuclumbusSearchHandler.java