This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

BP_XProfile_Field::name_and_description()

Private method used to output field name and description fields.

Description

Source

File: bp-xprofile/classes/class-bp-xprofile-field.php

	private function name_and_description() {
		?>

        <div id="titlediv">
            <div class="titlewrap">
                <label id="title-prompt-text"
                       for="title"><?php echo esc_html__( 'Name (required)', 'buddyboss' ); ?></label>
                <input type="text" name="title" id="title" value="<?php echo esc_attr( $this->name ); ?>"
                       autocomplete="off"/>
            </div>
        </div>

        <div class="postbox">
            <h2><?php echo esc_html__( 'Text members see when editing this profile field (optional)', 'buddyboss' ); ?></h2>
            <div class="inside">
				<?php
				/**
				 * Alternate title for when user edits their profile field.
				 * Reverts to primary title if nothing is entered.
				 *
				 * @since BuddyBoss 1.0.0
				 */
				?>
                <table class="widefat bp-postbox-table" style="margin-top: 6px;">
                    <tbody>
                    <tr>
                        <th><?php _e( 'Alternate Title', 'buddyboss' ); ?></th>
                        <td>
                            <input type="text" name="title_secondary" id="title_secondary"
                                   value="<?php echo esc_attr( $this->get_alternate_name() ); ?>" autocomplete="off"
                                   style="width: 100%;">
                            <p class="description"><?php _e( 'For example, "How old are you?" could be used instead of "Age".', 'buddyboss' ); ?></p>
                        </td>
                    </tr>
                    <tr>
                        <th><?php _e( 'Instructions', 'buddyboss' ); ?></th>
                        <td>
                            <textarea name="description" id="description" rows="6"
                                      cols="60"><?php echo esc_textarea( $this->description ); ?></textarea>
                            <p class="description"><?php _e( 'Explain to members how best to fill out this field.', 'buddyboss' ); ?></p>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>
        </div>

		<?php
	}

Changelog

Changelog
Version Description
BuddyPress 2.3.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.