99 Posts
SimonD
6 years ago
4
Topic

Hello everyone,

I would like to display an alpha scale (A B C …) in top of a Seblod list to filter items by the first letter of one field.
Could someone provide me some hints to do that?

Thank you

Get a Book for SEBLOD
1283 Posts
Bucklash
6 years ago
3
Level 1

Hi 

My thoughts

For your Search Form....

Create a select simple field with your options ie A=a, B=b etc

and set storage to the same as the field you want to filter.  

Then in 3 - match, set to beginning with.  

I think sounds about right.  

99 Posts
SimonD
6 years ago
2
Level 2

Hi Bucklash,

Many thanks for your reply.

I will give your idea a try.

One more question: is there a way to display the search filter in other way than select field. I'm thinking about radio buttons.

Thank you

1283 Posts
Bucklash
6 years ago
1
Level 3

Hi

Yes, you can. 

The tricky bit is getting the correct match setting.

Put debug on, and check the sql query as you experiment 

99 Posts
SimonD
6 years ago
0
Level 4

Hello Bucklash,

With your method, I've made it working with the default select field (not tried radio button yet).

Thank you again for your help.

Get a Book for SEBLOD