Changing the (Required) text to a *

Hello Cireson experts  :)
I haven't seen this nor asked nor answered yet over here (might have just missed it though!), but is there a way to change the default (Required) form in Required user inputs and prompts to a red * , which is globally ackownledged as a standard visualization for a required input? 
This was proposed by our User Experience team in our company and very much confirmed by a lot of other users who'd welcome this change. Can this be achieved through customizing .css or .js? If so , how? 
Thanks for the responses in advance! 

G. 

Answers

  • Geoff_RossGeoff_Ross Cireson Consultant Super IT Monkey ✭✭✭✭✭
    Hi @Gabriel_Lences
    Interesting Question.

    The following snippet should do the trick. You'll need this to run on all your form pages once the oob code has executed with custom task with null name.
    $('span:Contains("(Required)")').text('*').addClass('text-danger')

    Let me know if you need any more help getting it working.

    Geoff
  • Gabriel_LencesGabriel_Lences Member IT Monkey ✭
    edited February 21
    Thanks Geoff, we tried implementing your code with one of our devs and unfortunately it didn't work. 

    This code, however, which our devs came up with during the process, worked like a charm :)
    Sharing the code in case anyone needs a workaround or a solution for this request in the future. Place it in your custom.js.

     var labels = $('label.required-userinput-label');

     

        $.each(labels, function(index,value) {

             if($(this).text() == '(Required)'){

                $(this).text('*');

                    $(this).addClass('text-danger');

             }                  

        });

    Cheers,
    G. 
Sign In or Register to comment.