Created
April 9, 2016 08:39
-
-
Save AjayKumar01/a9e217b8b4e20bf09d03b906f5fad21b to your computer and use it in GitHub Desktop.
Hiding fields in create view of module
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
({ | |
/* Hiding fields in create view of opportunities module | |
* Ajay Kumar | |
* Path : custom/modules/Opportunities/clients/base/views/create-actions/create-actions.js | |
*/ | |
extendsFrom: 'CreateActionsView', | |
initialize: function(options) { | |
this._super('initialize', [options]); | |
this.on('render', this.hideField, this); | |
}, | |
hideField: function() { | |
_.each(this.fields, function(field) { | |
if (_.isEqual(field.def.name, 'sales_stage')) { | |
//~ field.hide(); | |
this.$('[data-name=sales_stage]').css('visibility', 'hidden'); | |
} | |
}, this); | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
field.hide();
This also will work.