• Resolved awesomeflyingdude

    (@awesomeflyingdude)


    Hi – I know I can modify this with Javascript/jQuery or CSS, but is there a built in way to display the Role Title on the form differently than it is defined in the backend? For instance, if I have a role title of “Accessories Dealer” can the Radio select display “Parts/Accessories Dealer”? I also would have thought I could use the role IDs in the “Edit Choices” text area, but that doesn’t work either.

    If there’s not a built-in way, will using CSS like this mess up the form submission?
    #option-to-be-changed:before { content: “Parts/” }

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @awesomeflyingdude

    You can try using gettext filter hook.

    add_filter("gettext_ultimate-member","um_013122_change_role_labels", 10, 3);
    function um_013122_change_role_labels( $translation, $text, $domain ){
     
         if( "Accessories Dealer" == $text ){
             $translation = "Parts/Accessories Dealer";
         }
     
         return $translation;
     }

    You can add the code to your theme/child-theme’s functions.php file or use the Code Snippet plugin to run the code.

    Regards,

    Thread Starter awesomeflyingdude

    (@awesomeflyingdude)

    You’re the best! Thank you!

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Thanks for letting us know how it resolved the issue.

    Regards,

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Display Different Role Title in Role ID on Registration Form’ is closed to new replies.