WordPress.org

Ready to get started?Download WordPress

Forums

Buddypress Xprofile Custom Fields Type
[resolved] How to add new fields? (8 posts)

  1. kizzywizzy
    Member
    Posted 1 year ago #

    Thanx for this plugin.

    1) How do we add new fields?
    2) Any way to add checkbox/dropdown support for new fields?

    http://wordpress.org/extend/plugins/buddypress-xprofile-custom-fields-type/

  2. donmik
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    Are you asking about how to add new fields type like birthdate type, email type or datepicker type? For this, you need to dive in the code of the plugin, we can help you if you need. Following the code of plugin you can create more types, but you need to have some programming skills to do this.

    If you're not asking for this, forgive me, my english is not the best...xD.

  3. kizzywizzy
    Member
    Posted 1 year ago #

    Yes, I am asking how to add new fields. I want to add new fields like "Gender". In this new field I want to add the words "Male or Female?"

    The same way that the "Email" field has the words "mail@example.com"

    Do you understand? I hope so. :)

  4. donmik
    Member
    Plugin Author

    Posted 1 year ago #

    You want to add the placeholder text, it's the name for the texto "mail@example.com" which appears in the field before the user starts typing his email.

    To do this, you need to code your own field's type. Buddypress didn't use placeholder and I added it in this plugin for the new field's types.

    If you need one field's type which can be reused for more people, share with us and maybe we can add it in future releases.

    But if you only want to create a Gender field, you can use radio buttons or dropdown select box, you don't need this plugin...

  5. kizzywizzy
    Member
    Posted 1 year ago #

    Let me explain.

    Problem: I am trying to add unserialized checkbox data into my BuddyPress members directory loop. At the time, it will not let me add profile data that have been selected using checkboxes or drop downs.

    I need to see if I can create a custom field with your plugin and use that in the members loop.

    Forget about placeholder text. Right now I need an alternative way to add unserialized profile fields to the members . I thought your plugin may be the answer but I need a new custom field using drop down or checkboxes to test it out.

  6. donmik
    Member
    Plugin Author

    Posted 1 year ago #

    Mmm, I believe this plugin can't help you for what you want.

    If you need to access profile data in members directory loop you can add in the template of this page, this code in the loop bp_members():

    <?php if ( bp_has_profile() ) : ?>
       <?php while ( bp_profile_groups() ) : bp_the_profile_group(); ?>
          <?php while ( bp_profile_fields() ) : bp_the_profile_field(); ?>
             <?php if (bp_get_the_profile_field_name() == 'name_of_checkbox_data_field') : ?>
                <?php bp_the_profile_field_value(); ?>
             <?php endif; ?>
          <?php endwhile; ?>
       <?php endwhile; ?>
    <?php endif; ?>

    This will show all profile data for all members. You can check if the field name is the name of your checkbox field to display only the data you need.

    I hope this helps.

  7. kizzywizzy
    Member
    Posted 1 year ago #

    Thank you, I had figured that out already and added it.

  8. donmik
    Member
    Plugin Author

    Posted 1 year ago #

    Great!

    I'm glad to hear this!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.