turning off the automatic link for name fields

  • 1
  • Problem
  • Updated 3 years ago
  • Solved
I have a form that has a table with row action buttons. If you click on the button for a row you get a set of child records displayed.... the problem is, if you click on the program name by accident it takes you to the detail record for that program (and there is no detail record form for the program... programs are only displayed in the table) is there a way to disable the link on the program names (which appears because they are a "name" field) ?

Photo of ktyler

ktyler

  • 9,244 Points 5k badge 2x thumb

Posted 5 years ago

  • 1
Photo of Zach McElrath

Zach McElrath, Employee

  • 49,056 Points 20k badge 2x thumb
You can do this by replacing the Field in the Table with a Template that looks almost the same but is not a link. 

1. Remove the Name field from your table.
2. Drag a Template component into the Table.
3. For Label,  put "Name".
4. For Body, put "{{{Name}}}". The triple-mustaches will cause Skuid to spit out the Name field value without running Skuid's default field-renderer on it (i.e. without making it a hyperlink).

Template fields are still Searchable just like regular fields, and they are also Sortable as of recent Skuid versions (I think 4.11 and higher), you should see an "Allow Ordering" checkbox on the Template field in the Table, and if you check it you get an "Order Field", which you should set to Name.
Photo of ktyler

ktyler

  • 9,244 Points 5k badge 2x thumb
Thanks Zach, That works, but it makes it not editable. Can I do some sort of conditional visible to get an editable field with the user is creating a new record or clicks on the pencil for a row ?
Photo of Zach McElrath

Zach McElrath, Employee

  • 49,056 Points 20k badge 2x thumb
Ah, true. You'll need to use a Custom Field Renderer --- here's a post that describes how: 

https://community.skuidify.com/skuid/topics/is_there_a_way_to_override_remove_a_lookup_fields_link?t...
Photo of John Greenhill

John Greenhill

  • 472 Points 250 badge 2x thumb
Hi friends,

I tried the above solution and the page spits out the ID, not the name text (no hyperlink). I successfully used the referenced custom renderer on REFERENCE fields, but I don't see a solution for a TEMPLATE in a field editor. Am I just missing it?

In my case, the page is read-only so I don't really care about edit mode, if that's any easier. We just don't want the company name to be a link.

Any tips?
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
You should be able to drag a template component into a field editor and it will appear as another field.  Here you define the merge code for the field.   {{{Reference.Name}}} 
Photo of John Greenhill

John Greenhill

  • 472 Points 250 badge 2x thumb
Oh, duh, so easy! I just had the reference wrong. Thanks for the shake up.