Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author donmik

    (@atallos)

    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.

    Thread Starter kizzywizzy

    (@kizzywizzy)

    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 “[email protected]

    Do you understand? I hope so. ??

    Plugin Author donmik

    (@atallos)

    You want to add the placeholder text, it’s the name for the texto “[email protected]” 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…

    Thread Starter kizzywizzy

    (@kizzywizzy)

    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.

    Plugin Author donmik

    (@atallos)

    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.

    Thread Starter kizzywizzy

    (@kizzywizzy)

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

    Plugin Author donmik

    (@atallos)

    Great!

    I’m glad to hear this!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Plugin: Buddypress Xprofile Custom Fields Type] How to add new fields?’ is closed to new replies.