WordPress.org

Ready to get started?Download WordPress

Forums

BP Profile Search
[resolved] How to change the names of the fields in the search page? (3 posts)

  1. findcam
    Member
    Posted 1 year ago #

    The ways the questions are asked to the user:

    'how old are you? ' are not consistent to how they would be searched "i'm looking for someone the age of"

    Is there a way to customize the labels for the fields on the search form?

    http://wordpress.org/extend/plugins/bp-profile-search/

  2. markkelly1982
    Member
    Posted 1 year ago #

    you can do it if you edit the hardcode.

    open bps-searchform.php

    comment out the existing switch statement block:

    switch (bp_get_the_profile_field_type ())
    {
    case 'textbox':
    echo "<label for='$fname'>$field->name</label>";
    echo "<input type='text' name='$fname' id='$fname' value='$posted' placeholder='$field->name' />";
    break;

    and replace it with something like the following:

    switch (bp_get_the_profile_field_name ())
    {
    case 'how old are you?':
    echo "<label for='$fname'>i'm looking for someone the age of:</label>";
    echo "<input type='text' name='$fname' id='$fname' value='$posted' placeholder='i'm looking for someone the age of:' />";
    break;
  3. Andrea Tarantini
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    I'm sorry for the late reply. I think the suggested solution is the best we can do with the current plugin version.

    Thank you Mark for sharing it!
    I'm marking this topic as resolved now.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.