Hi, I want to add a pop-up help text to some fields in Accounts module
Like
Name : [_________] ?
?- represents a information icon
and on clicking the ? icon it should popup a help text
I'm using sugar version 7.6
Hi, I want to add a pop-up help text to some fields in Accounts module
Like
Name : [_________] ?
?- represents a information icon
and on clicking the ? icon it should popup a help text
I'm using sugar version 7.6
You would simply create a custom field type for any fields that you need to add this to. This is done from the client/base/fields. The link below goes over all of it.
For example, if you wanted this on name field you could extend the file clients/base/fields/name/edit.hbs
Let me know if you have any questions.
Hi, Anoop Antony!
Let's say you need to set help popup on the record view. So you should to customize several files (for Accounts module):
In record.php add property:
'css_class' => 'help-class'
And in the controller record.js add:
// Some code before
events: {
"mouseenter .help-class" : "showHelpTooltip",
"mouseleave .help-class" : "hideHelpTooltip",
},
// Define method on mouse on the field event
showHelpTooltip: function() {
// You can get text for help info from language file or hard code here
// var content = app.lang.get('LBL_SOME_HELP_TEXT', this.module);
var content = 'Help Text Is Here';
this.$el.find(".help-class").popover({title: 'Help', content: content, placement: 'left'});
this.$el.find(".help-class").popover('show');
},
// Define method on mouse leave from field event
hideHelpTooltip: function() {
this.$el.find(".help-class").popover('hide');
},
// Some code after
I hope you'll find it useful.