Custom field: highlighted text not working right

Hi all

I followed these instructions -> https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_7.6/UI_Model/Fields/Examples/Creating_C…  

Works fine in List View:

However in Record View (edit mode), the color appears and then goes immediatly away:

I must be doing something awfully, silly, tiny, thing wrong (yes, I did do QR&R).   Help!!  

Ent 7.7.1.2

Thanks,

KGM

Parents Reply
  • ah yeah, sorry I think I didn't bring my point across: So when doing it exactly like in the documentation then you're not applying the changes to the edit recordview. There is a comment in the code of the edit.hbs that says that there the background changes aren't applied, but if you want to you can. So I think what you just need to do is something like:

    ./custom/clients/base/fields/Highlightfield/edit.hbs.

    {{!
        We have not made any edits to this file that differ from stock, however,
        we could add styling here just as we did for the detail and list templates.
    }}

    <input type="text"

    //add this line to change the input element
    style="background:{{def.backcolor}}; color:{{def.textcolor}}"

        name="{{name}}"
        value="{{value}}"
        {{#if def.len}}maxlength="{{def.len}}"{{/if}}
        {{#if def.placeholder}}placeholder="{{str def.placeholder this.model.module}}"{{/if}}
        class="inherit-width">
    <p class="help-block">

    Does this work?

Children