Search code examples
javascriptalpacajs

Alpaca - Replace '★' with '*' on required field


Is there a way to replace the Star symbol with an asterisk on a 'required' field label on Alpaca? enter image description here

Here is the schema:

var Schema = {
    "title": "Lista controlli",
    "type": "array",
    "items": {
        "type": "object",
        "title": "Controllo Lavorazione",
        "properties": {
            ...
            "Nome": {
                "title": "Nome",
                "type": "string",
                "required": true
            }
        }
    }
}

Thanks in advance.


Solution

  • You can deal with that using css like this:

    .alpaca-icon-required::before {
        content: "*"
    }
    

    You could also change it's font-size because it will be kinda big.

    Hope this works for you. I this isn't what you're looking for don't hesitate to comment.