Is there a way to selectively override/remove a lookup field's link?

  • 3
  • Question
  • Updated 2 years ago
  • Answered
I know I can override a "view" link globally or for profiles or record types, but can I do it selectively (or remove the link entirely) for an editable lookup field in Skuid? I want users to be able to set values in the lookup field, but NOT have the values in the field be clickable (or, at the very least, be able to override the link so I can take them somewhere else). I don't see how to do that with the settings for a lookup field.
Photo of Peter Bender

Peter Bender, Champion

  • 6,246 Points 5k badge 2x thumb

Posted 6 years ago

  • 3
Photo of Ben Hubbard

Ben Hubbard, Employee

  • 12,490 Points 10k badge 2x thumb
Official Response
Hi Peter,

Unfortunately there's no way to do that "Out of the box". However, this custom field renderer snippet should do the trick.



var field = arguments[0],
value = arguments[1];

if (field.mode === 'read') {
field.element.append(skuid.$('<div>').addClass('nx-fieldtext').text(field.model.getFieldValue(field.row,skuid.utils.getFieldReference(field.id,field.metadata))));
} else {
skuid.ui.fieldRenderers[field.metadata.displaytype][field.mode](field,value);
}