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

    (@atallos)

    To do this you need to change code in bxcft_edit_render_new_xprofile_field function of my plugin. For birthdate, it’s at the beginning of the function, replace this:

    <label class="label-form <?php if ( bp_get_the_profile_field_is_required() ) : ?>required<?php endif; ?>" for="<?php bp_the_profile_field_input_name(); ?>_day"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) { echo __('*', 'bxcft'); } ?></label>

    with this:

    <label class="label-form <?php if ( bp_get_the_profile_field_is_required() ) : ?>required<?php endif; ?>" for="<?php bp_the_profile_field_input_name(); ?>_day"><?php if ( bp_get_the_profile_field_is_required() ) { echo __('*', 'bxcft'); } ?> <?php bp_the_profile_field_name(); ?></label>

    Thread Starter catastr0phe

    (@kat_indo)

    That worked! Thank you!

    One more question: Is there a way to assign a class to the star?
    I have all of them changed to red, but I see that the whole thing is under <label></label> so that makes it hard to change it.

    Plugin Author donmik

    (@atallos)

    Of course you can replace this:

    echo __('*', 'bxcft')

    With this:

    echo '<span class="the_name_of_your_class">__('*', 'bxcft')</span>

    Then in you css you can use this class to apply styles to * only.

    Thread Starter catastr0phe

    (@kat_indo)

    I just tried it and it returns an error:
    Parse error: syntax error, unexpected T_STRING, expecting ‘,’ or ‘;’ in /home/public_html/website/wp-content/plugins/buddypress-xprofile-custom-fields-type/bp-xprofile-custom-fields-type.php on line 231

    Plugin Author donmik

    (@atallos)

    Sorry, it’s my fault:

    echo '<span class="the_name_of_your_class">'.__('*', 'bxcft').'</span>';

    Thread Starter catastr0phe

    (@kat_indo)

    Worked like a charm!

    Thank you attallos!

    Great plugin & amazing support!

    Plugin Author donmik

    (@atallos)

    Great! Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Move the asterisk in 'Birthdate'’ is closed to new replies.