Skip to main content

I would like to use reference fields in a table that require the user lookup the associated they need and also NOT automatically link in read mode.

Is there a way to do this without javascript? If not, what do I need to do in javascript?

Hey Pat,

Sounds like you want a standard reference field when in edit mode, but you don’t want a hyperlink when in read mode.

That’s possible using a custom field renderer. We’ve written some documentation on how to build a custom field renderer for a table: http://help.skuidify.com/m/11720/l/204496-table-component-custom-field-renderers

A reusable field renderer like you are describing could look something like this:


var field = argumentsg0],<br> value = argumentsg1],<br> template = '{{{' + ( field.id.substr( 0, field.id.length - 3 ) ) + '__r.Name}}}';<br>&nbsp; &nbsp;&nbsp;<br>if ( field.mode == 'edit' )<br>&nbsp; &nbsp; skuid.ui.fieldRenderersnfield.metadata.displaytype].edit( field, value );<br>else<br>&nbsp; &nbsp; field.element.append( skuid.utils.merge( 'ROW', template, {}, field.model, field.row ) );