I don't know if this is the correct place or not for this question. If not please advise where I should post it.
I am reworking a J3.x component over to J4. So far so good. The only thing I cannot seem to get working is the Clear button as part of the search tools. I have compared my codebase to both com_menus (closest comparison) and com_content and I cannot seem to determine what I am doing wrong. I get no javascript errors. Below are the relevant code snippets:
filter_emails.xml file:
<?xml version="1.0" encoding="utf-8"?>
<form>
<fields name="filter">
<field
name="search"
type="text"
inputmode="search"
label="COM_JMAILQ_SEARCH_IN_SUBJECT"
description="COM_JMAILQ_SEARCH_IN_SUBJECT"
hint="JSEARCH_FILTER"
/>
</fields>
<fields name="list">
<field
name="state"
type="list"
class="input-mini"
default="0"
label="COM_JMAILQ_SELECT_STATE"
description="COM_JMAILQ_SELECT_STATE_DESC"
onchange="this.form.submit();"
validate="options" >
<option value="0">COM_JMAILQ_SELECT_STATE</option>
<option value="11">COM_JMAILQ_EMAILSTATE_ERROR</option>
<option value="7">COM_JMAILQ_EMAILSTATE_FAILED</option>
<option value="1">COM_JMAILQ_EMAILSTATE_INJECTING</option>
<option value="3">COM_JMAILQ_EMAILSTATE_INPROCESS</option>
<option value="8">COM_JMAILQ_EMAILSTATE_ONHOLD</option>
<option value="9">COM_JMAILQ_EMAILSTATE_PENDING</option>
<option value="10">COM_JMAILQ_EMAILSTATE_QUARANTINED</option>
<option value="5">COM_JMAILQ_EMAILSTATE_QUEUED</option>
<option value="2">COM_JMAILQ_EMAILSTATE_READY</option>
<option value="6">COM_JMAILQ_EMAILSTATE_RETRY</option>
<option value="4">COM_JMAILQ_EMAILSTATE_SENT</option>
</field>
<field
name="limit"
type="limitbox"
class="input-mini"
default="25"
label="COM_CONTENT_LIST_LIMIT"
description="COM_HELLOWORLD_LIST_LIMIT_DESC"
onchange="this.form.submit();"
/>
</fields>
</form>
default.php
<form action="<?php echo Route::_('index.php?option=com_jmailq&view=emails'); ?>" method="post" name="adminForm" id="adminForm">
<?php
if (version_compare(JVERSION, '4.0', 'ge')) : ?>
<div class="row">
<div class="col-md-12">
<div id="j-main-container" class="j-main-container">
<?php // Search tools bar
echo LayoutHelper::render('joomla.searchtools.default', array('view' => $this, 'options' => array('filterButton' => false)));
?>
</div>
<?php else :
I think those are the most relevant parts. Let me know if there is something else needed. I have been wracking my brain for 2 days over this and getting nowhere.
Thanks.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-01-30 19:34:27 |
Closed_By | ⇒ | chmst |
What do you mean with "does not work"? Is there an event on this button - or does the function not reset the values after click?
The right place for your question is forum.joomla.org. Please ask there and maybe add a screen of your html - code.
I am closing here because it is not an issue of Joomla core.