Readonly / un-editable detail layout

Hi All, I’m new to Coda and still learning.

I’m hoping to have a table with 2 buttons each row. “VIEW” & “MODIFY” with the only difference is one’s editable one’s not.

I figured out how to show/hire columns or use different layout, but scratching my head trying to find a way to prevent editing, and can’t find any related post here.

With recent released sync pages, you can make the whole page readonly with no edit whatsoever.

There’s no great solution for this but all the posts I’ve seen around this topic (and there are many) use formula fields for each read-only field:

  1. Create a formula field for each field you want to show as read only on the layout where the formula is just the value of the original editable column
  2. Create a layout with only the formula fields
  3. Link your “View” button to this new layout
  4. Create a layout with the editable fields
  5. Link the “Modify” button to the editable fields view (requires creating a second view)
1 Like

Thanks for the hint, maybe I used wrong keyword to search

Formular sounds like awful lot of duplication, I think all these formular columns will be added to the source table rather then a “Display only column”

I stumbled on page locking which seems to do this in a somewhat way, but haven’t got my hear around the mechanism yet

Yeah you can use page locking as well. It’s a little wonky too but here’s how you do it:

  1. Create 2 pages: Read Only and Edit page
  2. You can create 1 layout and you can use both for the Read Only and Edit
  3. Add views to the both pages
  4. Set the Locking to “read only” on the Read Only page
  5. You can use the default open row functionality on both views to the open the rows if you want, or you can create buttons

You do have the issue of when you’re on the read only view and now want to edit. While it would be nice to click a “Edit” button and it sends the user to the Edit page/view and opens the layout this doesn’t work as you’d expect. It will actually open which ever layout is on the Edit page/view but will remain on the Read only page and inherit what ever Locking settings you have on the Read only page. So the user still can’t edit the row in this layout. I believe this to be a bug (and have filed it with Coda).

So in this case you may need to create 2 different button sets, 1 for each view:
Read View Button Set

  1. Read button opens the row in the read view layout
  2. Edit button forces a new browser window tab and takes them to the Edit layout for the row

Edit View Button Set

  1. Read button forces a new browser window tab and takes them to the View layout for the row
  2. Edit button opens the row in the edit view layout
2 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.