Hello, can anybody please help me fix this form? I’m trying to create a search form/plugin to allow users to search by comment id.
I was inspired by the KangarooJump plugin, but that is only for tasks. Plus it only works with a keyboard.
This is what I tried so far but cant get my head around how to relate the comment model to the form and then add a submit button so mobile users can use the search too.
<div id="SearchCommentID" class="">
<div class="">
<i class="fa fa-comment i-fw" aria-hidden="true"></i>Comment ID
</div>
<div class="">
<?php $commentID = $this->model->commentModel->getById($comment['id']); ?>
<form method="get" action="<?= $this->url->dir() ?>" class="search">
<?= $this->form->hidden('controller', array('controller' => 'TaskViewController')) ?>
<?= $this->form->hidden('action', array('action' => 'show','task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>
<div class="">
<?= $this->form->text($commentID, array(), array(), array('placeholder="'.t('TEST NOT OK').'"', 'pattern="[0-9.]+" title="'.t('Comment ID').'"'.'aria-label="'.t('Enter comment id').'"'.'style=""'), 'input-addon-field border-radius') ?>
</div>
</form>
</div>
</div>
Any help would be appreciated.