I'm editing osticket, open.inc.php. If there is any subcategory chosen but not with name "other" or "اخرى" and it chosen then Issue Summary and Issue Details are totally optional and fill them with just one space. there variables names are subject and message.
<style>
#hierarchicalTopics {
    display: flex;
    gap: 10px;
    flex-direction: column;
    justify-content: center;
}

#hierarchicalTopics select {
    padding: 5px 10px;
    border-radius: 3px;
    width: fit-content;
    border: 1px solid #ccc;
    background-color: #f5f5f5;
    min-width: 200px;
}
.error {
    color: red;
    margin-left: 5px;
    vertical-align: middle;
}

.topic-level {
    display: block;
}

#hierarchicalTopics select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333333' d='M6 8.825L1.175 4 2.238 2.938 6 6.7l3.763-3.762L10.825 4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

/* New styles for positioning the asterisk */

.form-header .error {
    margin-top: 2px; /* Adjust this value to fine-tune vertical alignment */
}
</style>
<?php
if(!defined('OSTCLIENTINC')) die('Access Denied!');
$info=array();
if($thisclient && $thisclient->isValid()) {
    $info=array('name'=>$thisclient->getName(),
                'email'=>$thisclient->getEmail(),
                'phone'=>$thisclient->getPhoneNumber());
}

$info=($_POST && $errors)?Format::htmlchars($_POST):$info;

$form = null;
if (!$info['topicId']) {
    if (array_key_exists('topicId',$_GET) && preg_match('/^\d+$/',$_GET['topicId']) && Topic::lookup($_GET['topicId']))
        $info['topicId'] = intval($_GET['topicId']);
    else
        $info['topicId'] = $cfg->getDefaultTopicId();
}

$forms = array();
if ($info['topicId'] && ($topic=Topic::lookup($info['topicId']))) {
    foreach ($topic->getForms() as $F) {
        if (!$F->hasAnyVisibleFields())
            continue;
        if ($_POST) {
            $F = $F->instanciate();
            $F->isValidForClient();
        }
        $forms[] = $F->getForm();
    }
}
function organizeTopics($topics) {
    $organized = [];
    foreach ($topics as $id => $name) {
        $parts = array_map('trim', explode('/', $name));
        $current = &$organized;
        foreach ($parts as $part) {
            if (!isset($current[$part])) {
                $current[$part] = [];
            }
            $current = &$current[$part];
        }
        $current['_id'] = $id;
        $current['_full_name'] = $name;
    }
    return $organized;
}

$allTopics = Topic::getPublicHelpTopics();
$organizedTopics = organizeTopics($allTopics);
?>
<h1><?php echo __('Open a New Ticket');?></h1>
<p><?php echo __('Please fill in the form below to open a new ticket.');?></p>
<form id="ticketForm" method="post" action="open.php" enctype="multipart/form-data">
  <?php csrf_token(); ?>
  <input type="hidden" name="a" value="open">
  <table width="800" cellpadding="1" cellspacing="0" border="0">
    <tbody>
<?php
        if (!$thisclient) {
            $uform = UserForm::getUserForm()->getForm($_POST);
            if ($_POST) $uform->isValid();
            $uform->render(array('staff' => false, 'mode' => 'create'));
        }
        else { ?>
            <tr><td colspan="2"><hr /></td></tr>
        <tr><td><?php echo __('Email'); ?>:</td><td><?php
            echo $thisclient->getEmail(); ?></td></tr>
        <tr><td><?php echo __('Client'); ?>:</td><td><?php
            echo Format::htmlchars($thisclient->getName()); ?></td></tr>
        <?php } ?>
    </tbody>
    <tbody>
    <td colspan="2">
        <div class="form-header" style="margin-bottom:0.5em; margin-top:2em;">
            <b><?php echo __('Help Topic'); ?></b>
            <span class="error">*</span>
        </div>
        <div id="hierarchicalTopics">
            <select name="topicLevel_0" class="topic-level" data-level="0">
                <option value="">&mdash; <?php echo __('Select a Help Topic'); ?> &mdash;</option>
                <?php
                foreach ($organizedTopics as $topic => $subTopics) {
                    $hasSubTopics = !empty($subTopics) && !isset($subTopics['_id']);
                    echo sprintf('<option value="%s" data-has-subtopics="%s">%s</option>',
                        htmlspecialchars($topic),
                        $hasSubTopics ? '1' : '0',
                        htmlspecialchars($topic)
                    );
                }
                ?>
            </select>
        </div>
        <input type="hidden" name="topicId" id="finalTopicId" value="<?php echo $info['topicId']; ?>">
    </td>
</tr>
    </tbody>
    <tbody id="dynamic-form">
        <?php
        $options = array('mode' => 'create');
        foreach ($forms as $form) {
            include(CLIENTINC_DIR . 'templates/dynamic-form.tmpl.php');
        } ?>
    </tbody>
    <tbody>
    <?php
    if($cfg && $cfg->isCaptchaEnabled() && (!$thisclient || !$thisclient->isValid())) {
        if($_POST && $errors && !$errors['captcha'])
            $errors['captcha']=__('Please re-enter the text again');
        ?>
    <tr class="captchaRow">
        <td class="required"><?php echo __('CAPTCHA Text');?>:</td>
        <td>
            <span class="captcha"><img src="captcha.php" border="0" align="left"></span>
            &nbsp;&nbsp;
            <input id="captcha" type="text" name="captcha" size="6" autocomplete="off">
            <em><?php echo __('Enter the text shown on the image.');?></em>
            <font class="error">*&nbsp;<?php echo $errors['captcha']; ?></font>
        </td>
    </tr>
    <?php
    } ?>
    <tr><td colspan=2>&nbsp;</td></tr>
    </tbody>
  </table>
<hr/>
  <p class="buttons" style="text-align:center;">
        <input type="submit" value="<?php echo __('Create Ticket');?>">
        <input type="reset" name="reset" value="<?php echo __('Reset');?>">
        <input type="button" name="cancel" value="<?php echo __('Cancel'); ?>" onclick="javascript:
            $('.richtext').each(function() {
                var redactor = $(this).data('redactor');
                if (redactor && redactor.opts.draftDelete)
                    redactor.plugin.draft.deleteDraft();
            });
            window.location.href='index.php';">
  </p>
</form>
<script type="text/javascript">
$(document).ready(function() {
    var topicData = <?php echo json_encode($organizedTopics); ?>;
    
    function createSubTopicSelect(level, parentValue) {
        var currentData = topicData;
        
        // Navigate to the correct level in the data structure
        for (var i = 0; i < level; i++) {
            var selectedValue = $('select[name="topicLevel_' + i + '"]').val();
            if (selectedValue && currentData[selectedValue]) {
                currentData = currentData[selectedValue];
            }
        }
        
        // If we've reached a leaf node or empty node, return null
        if (!currentData || Object.keys(currentData).length === 0 || 
            (currentData['_id'] !== undefined && Object.keys(currentData).length <= 2)) {
            return null;
        }
        
        var select = $('<select>').attr({
            'name': 'topicLevel_' + level,
            'class': 'topic-level',
            'data-level': level
        });
        
        select.append($('<option>').val('').text('— Select Subcategory —'));
        
        $.each(currentData, function(key, value) {
            if (key !== '_id' && key !== '_full_name') {
                var hasSubTopics = value && !$.isEmptyObject(value) && value['_id'] === undefined;
                select.append($('<option>')
                    .val(key)
                    .attr('data-has-subtopics', hasSubTopics ? '1' : '0')
                    .text(key));
            }
        });
        
        return select;
    }
    
    function updateFinalTopicId() {
        var selectedValues = [];
        $('.topic-level').each(function() {
            var value = $(this).val();
            if (value) selectedValues.push(value);
        });
        
        var currentData = topicData;
        var fullPath = '';
        for (var i = 0; i < selectedValues.length; i++) {
            if (currentData[selectedValues[i]]) {
                currentData = currentData[selectedValues[i]];
                fullPath += (i > 0 ? ' / ' : '') + selectedValues[i];
            }
        }
        
        if (currentData['_id']) {
            $('#finalTopicId').val(currentData['_id']);
        } else {
            $('#finalTopicId').val('');
        }
    }
    
    $('#hierarchicalTopics').on('change', '.topic-level', function() {
        var level = parseInt($(this).data('level'));
        var value = $(this).val();
        
        // Remove all subsequent levels
        $('#hierarchicalTopics select').filter(function() {
            return parseInt($(this).data('level')) > level;
        }).remove();
        
        if (value) {
            var nextSelect = createSubTopicSelect(level + 1, value);
            if (nextSelect) {
                $('#hierarchicalTopics').append(nextSelect);
            }
        }
        
        updateFinalTopicId();
        
        // Trigger AJAX for form updates
        if ($('#finalTopicId').val()) {
            var data = $(':input[name]', '#dynamic-form').serialize();
            $.ajax('ajax.php/form/help-topic/' + $('#finalTopicId').val(), {
                data: data,
                dataType: 'json',
                success: function(json) {
                    $('#dynamic-form').empty().append(json.html);
                    $(document.head).append(json.media);
                }
            });
        } else {
            // Clear the dynamic form if no topic is selected
            $('#dynamic-form').empty();
        }
    });
});
</script>