Hi,
I see that a lot of people are looking for an easy search bar, that they can display anywhere in there website. Since "Universal AJAX search" (from offlajn) is no more available on joomla 4, there is no more possibility to do that.
I did one using :
- "CB Auto Actions" from Joomlapolis
- "Convert Form" from Tassos
1/ In Community Builder, create a field to put all keyword you want to search with :
First create a "Text Field" named "keywords" which is not visible, not editable, not required by user,
but searchable and published
Then in CB Auto Actions, create an Auto action :
Type = "Field",
Global Tab : Triggered = "onAfterUserProfileSaved"
Conditions Tab : <none>
Action Tab :
Field : the "keyword" field created in step 1
Operator : "Set (Field = Value)"
Value : put here all the value you want to be searchable. For instance "[name] [surname] [city] " etc (all substitutions are supported)
2/ Create a form with the Convert Form extensions :
1 text field nammed « searchfield »
1 submit button
Go to > Behavior > PHP Scripts
After Form Submission script :
{ $submission->form->successurl = 'htt//your_url/searching?cb_keyword='.$submission->params;}
/searching is a published CB userlist page.
It will open the CB userlist, with only users that match with keywords searched in searchfield
You can display the "Convert form" wherever you want : module, page
The only thing I didn't manage to be complete is to set an AJAX suggestion