1

Would like to set a default value for the description field for a hyperlink type column in a custom list. This is not an option when adding the column - a description for the column definition is available, but there is no way to set a default value for the actual instance of a description field that is paired with the actual field value. Please reference the screenshot for a clearer understanding of the fields I'd like to populate with the default values.

enter image description here

0

Option #1: Use jQuery/Javascript on DOM ready

SharePoint creates two text fields for the URL field type, you'd need to set the value for the second matching element using javascript. Here's an example using jQuery:

$(document).ready(function() {
  //Note: id selector below needs to be the internal name
  //Use Firebug or IE tools to see how id(s) are constructed.
  $('input[id^="BusinessPlan"]').eq(1).val('Default Business Plan');
  $('input[id^="ImplementationPlan"]').eq(1).val('Default Implementation text.');
});

The above example is for New Form, for Edit form you should only set the default value if it's not already set or is null or empty.

Option #2: Use JSLink to override the field rendering.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.