AnsweredAssumed Answered

Align custom field in header pane

Question asked by Salvador Lopez on Sep 11, 2017

Hi developers,

I create a custom field type and put it in the header pane of the contacts module.

When I access to the record view, the new field looks good but when i click the edit button, the field change its place.

I want this field to be displayed nex to the full name.

I create its respective file detail.hbs, its controller file <name_field>.js and i tried to create the file edit.hbs but i can not show the new field in the correct place (next to the full name).

anyone know how to accommodate this field through the edit.hbs file? Im with version 7.9

This is the view customized by detail.hbs

And this is my edit.hbs


The content of both files is the same: (detail.hbs and edit.hbs)


And my controller is (optin.js):
({
    /**
     * Called when initializing the field
     * @param options
     */
    Texto: null,
    initialize: function (options) {
        //this._render();
        //this.format();
        this._super('initialize', [options]);
        this.model.on('sync', this.getOptin, this);


    },

    getOptin: function() {

        if(this.model){
            var optin=this.model.get('do_not_call');
            if(optin==true){
                this.Texto="CONTACTABLE";
            }else{
                this.Texto="NO CONTACTABLE";
                //this.render();
            }
            this._render();
        }
    },
    /**
     * Called when rendering the field
     * @private
     */
    _render: function () {
        this._super('_render');

    },

Outcomes