Forums

Add Search Reset Button

momentis 25 Feb, 2015
I found the code to add a search box to my CCv5 connection. However, how do I add a "Reset" button for the search, similar to what was in CCv4?

Thanks!
Rick
Max_admin 04 Mar, 2015
Answer
1 Likes
Hi Rick,

You can add a reset field which submits the form (the whole list is inside a form) OR you can add a link to the listing but include this in the link:
&srch=
which is going to reset the search.

The link can look like a button by using this class:
btn btn-default


Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
momentis 05 Mar, 2015
Hi Max,

I am getting around to implementing this, but I am confused (happens all the time to me!).

I am displaying the CCv5 List, which is not within a form. I placed a link on the form to the list itself and appended the "&srch=" to the end of the URL, but that does not work. What am I missing?

Thanks!!
Rick
Max_admin 05 Mar, 2015
When you click the link, to which address you get redirected ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
momentis 05 Mar, 2015
I think I was trying the wrong URL. Here is what I have now, which seems to work:

http://mydomain.com/user-account/manage/full-customer-list?cont=lists&srch=

Initially, I was trying to append the search text to the URL without "?cont=lists" (the URL direct to the listing from the menu), but that did not work. Trial and error got me to the above.

In any case, it is working now, so I thank you very much for your help!! Any chance of having the "reset" feature added, similary to what you had in CCv4?

Rick
Max_admin 05 Mar, 2015
Hi Rick,

In case the url didn't have an query parameters, you had to use ?srch= instead!

How did the reset work in CCv4 ? I can't remember!๐Ÿ™‚

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
momentis 05 Mar, 2015
In CCv4, when a search was added to a connection list, the reset function was automatically placed. No idea how it worked - I just know it did! LOL
Max_admin 05 Mar, 2015
Ok, I will try to add something similar!๐Ÿ™‚
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
marcinwolejko 21 Aug, 2015
I found a way to handle that problem. I checked the code in CCv4 and copied the part with RESET button๐Ÿ™‚

Now my search field looks as follows and works like a charm.

<div class="form-group gcore-form-row" id="form-row-multi-6">
<div class="gcore-subinput-container" id="fitem-text6"><label for="text6" class="control-label gcore-label-left">SEARCH:</label>
<div class="gcore-input pull-left gcore-sub-input gcore-display-table" id="fin-text6"><input name="srch" id="search" value="" placeholder="SEARCH HERE" maxlength="" size="" class="form-control A" title="" style="" data-inputmask="" data-load-state="" data-tooltip="" type="text" /></div>
</div>
<div class="gcore-subinput-container" id="fitem-button7">
<div class="gcore-input pull-left gcore-sub-input gcore-display-table" id="fin-button7"><input name="button7" id="button7" type="submit" value="Search" class="form-control A" style="" data-load-state="" /></div>
<div class="gcore-subinput-container" id="reset">
<div class="gcore-input pull-left gcore-sub-input gcore-display-table" id="reset"><input name="reset" id="reset" type="submit" value="Reset" class="form-control A" style="" data-load-state="" onClick="document.getElementById('search').value = '';" /></div>
</div>
</div>
momentis 21 Aug, 2015
Thanks so much for this, marcinwolejko!!
marcinwolejko 21 Aug, 2015
You're welcome.
Hope you'll manage to make it wok๐Ÿ™‚
This topic is locked and no more replies can be posted.