Skip to Content Skip to Menu

🏖 End of summer sale! Savings on all memberships including single add-ons! Get 25% off now with code SUMMER25!

[TIPS] Create an easy search bar with Auto actions and Convert Form (Tassos)

  • fg88
  • fg88
  • OFFLINE
  • Posts: 13
  • Thanks: 5
  • Karma: 1
9 months 2 weeks ago - 9 months 2 weeks ago #335961 by fg88
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
Last edit: 9 months 2 weeks ago by fg88.
The following user(s) said Thank You: pepperstreet

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum