This topic is locked

Alphabet Bar

2/19/2021 2:55:38 PM
PHPRunner General questions
A
AlphaBase author

See image below...
Does anyone know how I could add an A-Z alphabet "bar" or buttons to filter a grid, say by the first letter of the last name? So if the user clicks "A" all the last names that begin with the letter A are displayed. I know I could use 26 WHERE clauses, but those are spaced apart and I don't know if they would wrap or whatever. Is there another way to do this?


D
DealerModulesDevClub member 2/19/2021



See image below...
Does anyone know how I could add an A-Z alphabet "bar" or buttons to filter a grid, say by the first letter of the last name? So if the user clicks "A" all the last names that begin with the letter A are displayed. I know I could use 26 WHERE clauses, but those are spaced apart and I don't know if they would wrap or whatever. Is there another way to do this?




Googling around I found this video on using Ajax to filter by alphabet. Maybe this will help?

https://www.bing.com/videos/search?q=php+alphabet+filter&docid=608047450002425128&mid=EBB901E16A1CBF603A12EBB901E16A1CBF603A12&view=detail&FORM=VIRE

W
wpl 2/19/2021



See image below...
Does anyone know how I could add an A-Z alphabet "bar" or buttons to filter a grid, say by the first letter of the last name? So if the user clicks "A" all the last names that begin with the letter A are displayed. I know I could use 26 WHERE clauses, but those are spaced apart and I don't know if they would wrap or whatever. Is there another way to do this?




A long time ago (in 2013), there was a post by FunkDaddy answering this kind of question
Creating An A-Z Quick Link Bar
Maybe this can be done in a more elegant way with the latest versioons of PHPRunner, but it could be a starting point.
Regards

D
david22585 2/19/2021

Using the list page? If so, using the additional WHERE tabs should do what you want.

A
AlphaBase author 2/19/2021



Using the list page? If so, using the additional WHERE tabs should do what you want.


Thanks. If you read my original post you may have seen that the reason I don't want to use 27 where clauses is that they are too spread apart.

A
AlphaBase author 2/19/2021

>

Googling around I found this video on using Ajax to filter by alphabet. Maybe this will help?

https://www.bing.com...etail&FORM=VIRE


Modules, thanks for the video link. To be honest it looks too complex and too intensive (time-wise) to implement.

A
AlphaBase author 2/19/2021



A long time ago (in 2013), there was a post by FunkDaddy answering this kind of question
Creating An A-Z Quick Link Bar
Maybe this can be done in a more elegant way with the latest versioons of PHPRunner, but it could be a starting point.
Regards


wpl, cool. I think that may work. I'll check it tomorrow. Thanks

D
david22585 2/20/2021



Thanks. If you read my original post you may have seen that the reason I don't want to use 27 where clauses is that they are too spread apart.


Missed that, sorry. Was on a phone replying. You may be able to use CSS to space them closer.