I am using this code but I was wondering if it's possible to make 'termination date' BOLD?
fd.spRendered(function() {
fd.field('Termination_x0020_Date').description = 'Please remind your Employee to Print/Save copies of their P60/payslips before the termination date'
});
You can update the description HTML to add styling like this:
//add description
fd.field('Termination_x0020_Date').description = 'Please remind your Employee to Print/Save copies of their P60/payslips before the termination date'
//update styling
$(fd.field('Termination_x0020_Date').$el).find('.text-muted').html('Please remind your Employee to Print/Save copies of their P60/payslips before the <b>termination date</b>')
fd.spRendered(function() {
fd.field('Termination_x0020_Date').description = 'Please remind your Employee to Print/Save copies of their P60/payslips before the termination date'
$(fd.field('Termination_x0020_Date').$el).find('.text-muted').html('Please remind your Employee to Print/Save copies of their P60/payslips before the <b>termination date</b>')
});
.text-muted — is the CSS class of the description element.
Is this a date field? try out using this code:
fd.spRendered(function() {
fd.field('Field1').description = 'Please remind your Employee to Print/Save copies of their P60/payslips before the termination date'
$(fd.field('Field1').$el).ready(function(){
$(fd.field('Field1').$el).find('.text-muted').html('Please remind your Employee to Print/Save copies of their P60/payslips before the <b>termination date</b>')
})
});
Description can't be added for the Attachments field using this method. You can try adding the description using the Text or HTML controls. Add control below the field and customize its appearance using CSS.
For the choice field, the code should work. Check the browser console for errors.
How can I add open a field descriptor in a dialog box? I tried it using this code but the link doesn't do anything.
//This code will open the Cost-Centre Code hyperlink in a dialog box - [Wizard 1]
var CostCentre = document.getElementById("Cost-Centre");
CostCentre.onclick = function() {
Dialog.open('', {}, {} )
return false;
};
//This code applies a field description under the Cost Centre Code field- [Wizard 2]
fd.field('Cost_Centre').description = "Where can I find this?";
$(fd.field('Cost_Centre').$el).ready(function(){
$(fd.field('Cost_Centre').$el).find('.text-muted').html('<a id="Cost-Centre" href="#">Where can I find this?</a>')
})
I would like to open a .ASPX WIKI page which I have designed to help users find out what Cost Centre means and where they can locate it in my organisation.
I figured out how to open a .ASPX page via a field descriptor instead of using HTML control.
This approach is much better as it eliminates the need to add HTML control to the designer.
Here is the code that will do the job:
//This code will open the Employee Email Address help message in a dialog box - [Wizard 2]
fd.field('Employee_Email_Address').description = "Click for acceptable email domains";
$(fd.field('Employee_Email_Address').$el).ready(function(){
$(fd.field('Employee_Email_Address').$el).find('.text-muted').html('<a id="EmailHelp2" href="#">Click for acceptable email domains</a>')
var Email = document.getElementById("EmailHelp2");
$('#EmailHelp2').click(function(){
Dialog.open('#', {}, {},{
width: 600, height: 600, title:"MY TITLE"})
});
})