Form Builder

Contents

Build a search form

You can build your search forms in the admin page Users -> Profile Search. If you need help, use the Help tab above the screen title.

To create a new form, use the button Add New. You can then enter the form title, add the form fields, specify the form settings and select the form template.

Form Fields

In this section you can add, remove and reorder the fields of your search form.

  • Customize the field label and description, or leave them empty to use the default
  • Select the field search mode from the Search Mode drop-down list
  • To reorder the fields in the form, drag them up or down by the handle on the left
  • To remove a field from the form, click Remove on the right
  • To leave a field description blank, enter a single dash (-) character

For additional information on search modes, see the Search Modes page.

[back to Contents]

Form Settings

In this section you can specify the form settings.

Form Method
Select your form’s method attribute.

  • POST: the form data are not visible in the URL and it’s not possible to bookmark the results page
  • GET: the form data are visible in the URL and it’s possible to bookmark the results page

Directory (Results Page)
Select the member directory to be used as your form’s results page. You can choose:

  • The BuddyPress Members directory
  • One of the member directories built with this plugin

You can create a member directory using the shortcode [bps_directory]. To learn more, see the Custom Directories page.

Add to Directory
Choose whether to display your form in the selected member directory.

[back to Contents]

Form Template

In this section you can select how to display your search form.

  • Select the form template
  • Specify the template options, if any

The form template works just like any other BuddyPress template. To override a form template, copy it to the ‘buddypress/members’ directory in your theme’s root, then edit the new copy according to your needs. To learn more, see the Form Templates page.

[back to Contents]

Persistent Search

In this section you can enable or disable the persistent search feature.

  • If enabled, a search is cleared when the user hits the Clear button
  • If disabled, a search is cleared when the user hits the Clear button, or navigates away from the results page

This selection applies to all your forms at once.

[back to Contents]

Display a search form

After you build a search form, you can display it:

  • In its member directory, using the option Add to Directory
  • In a sidebar or widget area, using the widget Profile Search
  • In a post or page, using the shortcode:
    [bps_form id=form_id] (*)
  • Anywhere in your theme, using the PHP code:
    <?php do_action ('bps_display_form', form_id); ?> (*)

(*) Replace form_id with the actual ID of your form.

[back to Contents]

Notes

This page has been updated for BP Profile Search 5.1 (September 14, 2019). If you have suggestions for improvement, if you need help, or if something is not working for you as expected, please use the Support Forum.