Topic: FA WITH AUTOCOMPLETE DEMO AND DOWNLOAD

Hi,

Everyone  I am back with another FA Modification that is Autocomplete Select Box.

The script is in pure JavaScript with Zero dependency.

You can enable or disable it on config file at end of the page($auto_select_box=true or false)

You can search by category also

consider as My contribution to FA

please give feed backs

Also  may be you can make my script more great, smile looking forward to it

DEMO


user : admin
password : demo

DOWNLOAD

to read about the list of files changed and details read my blog click more info

MORE INFO

Updated

Fixed some bugs and overflow problems
Also read how to incorporate Auto-Complete Box into a excisting FA in my Updated Blog.

Last edited by anoopmb (04/01/2016 04:56:20 am)

THANKS
ANOOP

Re: FA WITH AUTOCOMPLETE DEMO AND DOWNLOAD

Looks great. I'll try it.

Thanks.

Re: FA WITH AUTOCOMPLETE DEMO AND DOWNLOAD

Working fine. Thanks

I have made edits before to let search in customer list to search in addresses also
Now it can't, I believe it will not search in full client name & tax.
is there is any solution for this edit to search by ajax in db for defined fields

Re: FA WITH AUTOCOMPLETE DEMO AND DOWNLOAD

it will search the entered text  in loaded options only.

some bugs fixed and updated.

THANKS
ANOOP

Re: FA WITH AUTOCOMPLETE DEMO AND DOWNLOAD

your modification is very useful!

Thank you anoopmb,

Re: FA WITH AUTOCOMPLETE DEMO AND DOWNLOAD

Hi, I made a little modification to your Javascript like following. This modification will allow us to search string that contains the Regex special characters.

if (typer.value != '' && typer.value != null) {
    var pattern = escapeRegExp(typer.value); // Escape some Regex special character.
    var tes = new RegExp('(' + pattern + ')', "i");
    pop('block', tes);

}

I also add this new function to do the escaping process.

function escapeRegExp(str) {
  return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
}

Re: FA WITH AUTOCOMPLETE DEMO AND DOWNLOAD

thanks for your contribution

THANKS
ANOOP

Re: FA WITH AUTOCOMPLETE DEMO AND DOWNLOAD

Dear anoopmb,

This is an awsome modification to FA. It has totally changed the shape of it.

One problem that I am facing is that once an item filtered and then selected then using TAB key the next focus is lost. It is not shifting to the next text box on the page.

Regards.

Re: FA WITH AUTOCOMPLETE DEMO AND DOWNLOAD

Thank you and about TAB key I will check it later but soon. Currently I am little busy with another development.

THANKS
ANOOP

Re: FA WITH AUTOCOMPLETE DEMO AND DOWNLOAD

Dear Anoop
I found that after implementing this Auto Complete Feature the Editable Description on Quotation/Direct Sales Invoice is not working now.
Can you please look into it. The editable description feature is very important for our business. Now we are in a fix what to do?

Re: FA WITH AUTOCOMPLETE DEMO AND DOWNLOAD

yeah i will check and update it shortly and thank you for your information

THANKS
ANOOP

Re: FA WITH AUTOCOMPLETE DEMO AND DOWNLOAD

I really like this modification and I'm using it in my development. Few days ago I try to fix the problem related to TAB and lost focus I made the following modifications.

typer.onfocus = function (event) {
    # pop("block"); // I remove this.
    // Then add this line so the textfield will not lost focus if Enter is pressed.
    save_focus(typer);
    typer.select();
};

And also this one.

// I add the 9 (Tab) and 16 (Shift) so the popup list will not be displayed if tab or shift is pressed.
if(event.which!=13&&event.which!=16&&event.which!=17&&event.which!=18&&event.which!=19&&event.which!=20
    &&event.which!=27&&event.which!=35&&event.which!=36&&event.which!=37&&event.which!=38
    &&event.which!=39&&event.which!=40&&event.which!=91&&event.which!=93&&event.which!=224
    &&event.which!=16&&event.which!=9){

After that modification, the autocomplete textfield will not lose the focus when I press Enter and I can safely press Tab to move to cursor to another element.

But one issue still remains in item list that has the textfield for typing item code. In the previous traditional select, when we type the item code, the selected item in list will be changed too based on the code we type. But that's not happen now.

Anoop, I think you can consider to put this modification to GitHub so the people can contribute easier for the development smile.


Thank you

Last edited by bogeyman2007 (05/15/2016 07:14:13 am)

Re: FA WITH AUTOCOMPLETE DEMO AND DOWNLOAD

thank you very much and i will add this to github with your modifications

THANKS
ANOOP

Re: FA WITH AUTOCOMPLETE DEMO AND DOWNLOAD

Anoop earlier I wrote that the Editable Description is not working with this modification. But later I could find that If I select the same Item twice then it allows to Edit the Description.

Re: FA WITH AUTOCOMPLETE DEMO AND DOWNLOAD

link not working ....can u share it again

Re: FA WITH AUTOCOMPLETE DEMO AND DOWNLOAD

I have the modification in the following link:
http://stuff.w3shaman.com/others/fa-autocomplete.zip

Please, remember to backup your code before using it.

Re: FA WITH AUTOCOMPLETE DEMO AND DOWNLOAD

How to make it work on version 2.4 bogey ?

Phuong

Re: FA WITH AUTOCOMPLETE DEMO AND DOWNLOAD

Can anyone help with this Auto Complete in 2.4?

Re: FA WITH AUTOCOMPLETE DEMO AND DOWNLOAD

hey boxygen,

what help you need?

THANKS
ANOOP

Re: FA WITH AUTOCOMPLETE DEMO AND DOWNLOAD

I am using your auto complete in 2.3.25

Please suggest any changes to make it usable in 2.4 as well

Re: FA WITH AUTOCOMPLETE DEMO AND DOWNLOAD

Any help expected @anoopmb?

Re: FA WITH AUTOCOMPLETE DEMO AND DOWNLOAD

Can i have a copy of these mod please

Re: FA WITH AUTOCOMPLETE DEMO AND DOWNLOAD

In Post 16 bogeyman has given the link to download

http://stuff.w3shaman.com/others/fa-autocomplete.zip