This topic has 5 replies, 3 voices, and was last updated 10 years by Abe.

  • Author
  • #19679
     ElectroMagnetic
    Participant

    Hi there.
    The field descriptions in the Profile fields are appearing underneath the selection boxes. I would like the description to appear immediately under the fieled title and makes the selection process much easier and clearer.
    Here it was discussed, but would really be gratefull if you could assist with a clearer guidance, as I am not familiar with coding.
    I found the <p class=”description”><?php bp_the_profile_field_description(); ?></p> in my sweetdate/registration/register.php (in the child theme but dont know where to place it to get the desired affect.
    Also how would I add a description to the additional groups I have create to have the same affect as above (group title with description under then all the fields to edit?)
    Look forward to your help.

    #20026
     Catalin
    Moderator

    Hi ElectroMagnetic,
    Unfortunately with the latest Buddypress 2.0 the generation of the fields is automatically done by a Buddypress method and can’t be easily changed. You can only move it before the visibility section in your template. You need HTML/PHP/CSS knowledge to change templates. You can hire a developer to help you with any custom changes that are outsite your knowledge.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #21098
     ElectroMagnetic
    Participant

    Hi there Catalin
    I ended up at the wordpress forum and one of the developers of buddy press “donmik” posted a fix for this problem as a javascript solution. I have tried it in my “register.php” in the child theme…but I cant get it to work even when encased in <script>…. </script>
    This is the code he gave:

    Question : How can I put description text below my field’s label ?
    How to : For now, you can use javascript to do this. Write this javascript at the end of your template file (register.php for example).
    Code:

    // For each description we have.
    jQuery(‘p.description’).each(function() {
    // Clone description.
    // Looking for parent div.
    // Looking for label of checkbox field or radio field first.
    var desc = jQuery(this).clone(),
    parent = jQuery(this).parent(),
    label = parent.find(‘span.label’);
    // If there is no label of checkbox field or radio field, we look for normal labels.
    if (!label.length) {
    label = parent.find(‘label’);
    }
    // If there is a label.
    if (label.length) {
    // Putting the description after the label.
    label.after(desc);
    // Removing the original description.
    jQuery(this).remove();
    }
    });

    Please, Please can you help me with this…Logically, on any form the description should be before the answers you want the client to give.
    I would really appreciate your help here.

    #21759
     Abe
    Keymaster

    try to wrap that code in:

    COPY CODE
    
    jQuery(document).ready(function() {
    
    //code here
    
    });
    
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #21808
     ElectroMagnetic
    Participant

    Hi Abe, thanks for the suggestion….but it did not make any difference
    Do you perhaps have any other thoughts?

    #22043
     Abe
    Keymaster

    Well I can’t think of another solution. Sorry. try to debug that code since it could have some errors

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.

Log in with your credentials

Forgot your details?