Support

  1. drjjw
  2. General
  3. Friday, January 08 2021, 09:45 PM
Hello,

Is there any way with Javascript you can clear or reset the search parameters without having to reload the page? I am using the Ajax option but can't seem to reset

Jordan
drjjw Accepted Answer
Pro
Content Protected
  1. more than a month ago
  2. General
  3. # 1
drjjw Accepted Answer
Pro
I fixed it. I moved it prior to the search button
  1. more than a month ago
  2. General
  3. # 2
drjjw Accepted Answer
Pro
Thanks! That worked except for a very small issue. When you clear the from, the list odes not update unless you also click outside the button after clearing it on a click. I have added the form to the site details below
  1. more than a month ago
  2. General
  3. # 3
admin Accepted Answer
Admin
- Create template override: copy file from /components/com_jsn/list/tmpl/default_search.php in /templates/your-theme-folder/html/com_jsn/list/default_search.php
- In the new file at line 87 add the same code

If you use the table users list menu item instead the normal user list menu item then the file is called "table_search.php"
  1. more than a month ago
  2. General
  3. # 4
drjjw Accepted Answer
Pro
Will do.

And we want to also add to the view for the menu item search, what is the file location for that override?
  1. more than a month ago
  2. General
  3. # 5
admin Accepted Answer
Admin
Hi,
try with this code please
<input type="button" onClick="this.form.reset();jQuery('select').trigger('liszt:updated');jQuery(this).next().click();" class="btn btn-primary" value="Clear" />
  1. more than a month ago
  2. General
  3. # 6
drjjw Accepted Answer
Pro
Thanks very much. That works for text boxes but not for select boxes (both the Chosen [chzn] boxes and the version of select boxes which appear on iphone)
  1. more than a month ago
  2. General
  3. # 7
admin Accepted Answer
Admin
Hi,
with Joomla template override feature you can add a "Reset" button in search module or users list component view. for example if you use a search module the follow these steps:
- Create template override: copy file from /modules/mod_jsnsearch/tmpl/default.php in /templates/your-theme-folder/html/mod_jsnsearch/default.php
- In the new file at line 98 add the following code
<input type="button" onClick="this.form.reset();jQuery(this).next().click();" class="btn btn-primary" value="Clear" />
  1. more than a month ago
  2. General
  3. # 8
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Request Support

Support is currently Offline

Support Availability

Working days: Monday to Friday. The support staff is not available on weekends; in the most of cases tickets will not be answered during that time.

Reply time: Depending on the complexity of your support issue it's usually between a few minutes and 24 hours for paid members and about one week for free members. When we expect longer delays we will notify you.

Guidelines

Before you post: read the documentation and search the forums for an answer to your question.

When you post: include Site Details if you request a support (you can use the form below the reply in Site Details tab).

Auto Solved Question: If after a week the author of the post does not reply to a request by moderator, the question will be marked as resolved.

Language: only English

Search Users

Easy Profile® is not affiliated with or endorsed by Open Source Matters or the Joomla Project. Joomla is Free Software released under the GNU/GPL License.