Migx Search form with filters in frontend

I thought I can find the solution on old forums but I cant find so here is my question…

I created a CMP with Migx and using MixLoopCollection with a tpl to show the results on my site.
following are the database table fields -

I want search form on my website so users can search blood donors from thousands of donors in easy way by just typing Blood Group name which stored in donorbloodgroup field in database by migx (in back end cmp)
Like they type A positive and the results come up with all the only A positive donors (from donorbloodgroup).

Honestly I searched everywhere but cant find the solution. I never used any search stuff in Modx so this is new for me.

I know that this can be achieved with formit or ajaxsearch etc but I dont know how to do it.
Please guide me to the right direction. :slight_smile:

1 Like

I think advsearch is the solution. I am looking into the documentations and will find a way for sure.


1 Like

@lkfranklin can you help me ? I asked similar question months ago in old forum which was also unsolved and I ended up with wordpress for this kind of similar problem.

You suggested there for search in tables with formit that time also.

Can you suggest me this time something more ? I promise I will catch this time. :slight_smile:

If Formit is the solution with hooks then can you tell me how ?

you could just use migxLoopCollection and prepare the where-property with a snippet, which sanitises the search-term and prepares the where-statement as json

1 Like

wouldn’t be a listbox with all possible donors the better option instead of a text-input?

1 Like

How? I am new in front end with Migx. I only use Modx for CMP and REST APIs…

Yes it will also be a good option. Listbox, radio button, drop down select button or any is preferable. I just want visitors to get the donor fast from the list.

One more thing I thought is the I create tabs for different blood groups and then there we get only one group list of donors.
Like tab 1 for A Negative, Tab 2 for A Positive and so on…
But I dont know how to filter from database.

donorbloodgroup in database store data from Migx listbox tv (CMP).
I am little bit confused and little bit new in frontend with Migx. :sweat_smile:

&where=`{"donorbloodgroup":"A positive"}`

in the migxLoopCollection - snippet-call would do it

1 Like

Fantastic. I didnt know it will be that easy.
Thanks to you sir.
How to paginate migxLoopCollection ? So I can show 10-20 donors per page etc…

1 Like

This might help


you can wrap migxLoopCollection in getPage

[[!getPage? &element=`migxLoopCollection` &otherProperties.........]]

Works like charm :smiling_face_with_three_hearts:
Thank you so much!! :slight_smile:[quote=“nuan88, post:10, topic:1396, full:true”]
This might help


1 Like

Hey @bruno17 is this possible in Migx ? I am also looking for this filter for different pages.


Check their check boxes. :slight_smile:


1 Like

Let’s pls make a new thread if you will, to keep info isolated and clear. And let’s get keywords into this question lol. By keywords I mean specific functionality that is desired.

If you don’t mind, it will be better down the road for our future developers. @bruno17 has been great to keep in touch with the questions, really cool development going on now, but without requirements nothing can be achieved.

Minishop is part of the community even if language divides us to some extent. The reason its paid is because its got really well developed functionality. Honestly if you wanted that functionality it would be better just to pay for it, the number of hours you would put into developing it yourself would be so extreme that the trade off is clear.

However certainly we can explore the options here, don’t mean to shut anything down

I am not going lut of topic. Read my first post and see that picture. I was asking for tue same thing for filter plus now asked for if checkbox is possible.

If I want to spend money then I will spend on WordPress because there is value for money plugins. I know developers work very hard. I am active on both Modx and WordPress communities amd feel that there are people response really well and fast.

I am not blaming developers of Extras here but Documentations are not very well written. There are only fews extras ehich documentations are good. Otherwise many users face problems and ask silly questions because they cant find in documentation.

I ask questions because I have to struggle here for every little things.

Seach and filter is not that tought part in development but how it works with particular extra is. And you are suggesting me to pay for it.

Wordpress has built in search query which can be extended and well documentad to understand. I can easily do it in WordPress but I am here want to do everything in Modx so I can help others also in future and learn.

Modx has learning curves but problem is documentation. :blush:

If you see old forums and check users signatures then there you can find their website address. When you check, you see that everyone’s website is made in WordPress but not in Modx.

They left Modx. I feel very sad. I am here and will be forever. I just want to learn stuffs. And for that I am not going to pay. :blush:
Because there are other places where spending money makes sense. :roll_eyes:

How can i contribute when i dont know it well? :pensive::sweat:

Dont get me wrong. I am big fan of Modx.

1 Like

No worries, I was just thinking about keywords for future searches

Lol :joy: i thought i added search.
let me check again.
Update: cant add new tags. Thats the problem

Haha ok, I was treating search as a general term but I guess it isn’t. Certainly search function isn’t a core part of Minishop2 either. Its in our chat so its searchable. Lol. Search function for MIGX

I definitely agree we should just develop away, I would like to see more public tools that we can all utilize. The devs will have to keep ahead of us, but I am quite sure Modmore and Minishop among the others will be ok, they know their market and have built up a lot of tools that are valuable to customers.

We are trying to get good docs so people can implement several functions quickly. That’s where Modx has trouble to compete with WP for example which can get you certain functionality quickly.

For now I feel MIGX especially will benefit from all the clear answers in this new forum, well there are probably others I don’t follow.

Yeah. Migx is king. I think Migx should be core part of Modx. So users can easily create Cmps and then extend its functionalities as per thier needs. Like they create new resources.
so simply create a new cmp, alc select, tick few options like search, rest apis, gallery etc and then click generate to generate a fully functioning cmp. Like a blog. A gallery, album, project management, school management system, or just a full backend for mobile apps. Like for react…
Headless cms wizard :stuck_out_tongue_winking_eye:

With this way, Bruno also have to less stress of replying to every mini questions of users because most of them will get 80% of what they want then they will simply extend it as per requirements.

Just a thought in my mind. :blush:

Modx 3 is on development and I think they can do this to extend its power for end users also.

We can attract more developers to choose Modx over WordPress.

I researched alot about it. Modx 3 can be a killer CMF if tthey bring cmp generator inside ot as a feature.

CMP Wizard for quick start development in Modx.


This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.