Conditionally Render a Field as Read or Read-Only

  • 1
  • Question
  • Updated 3 years ago
  • Answered
Hello,

Maybe this has been mentioned before but couldn't find anything on the community, but is it possible to set a specific field's rendering as read or read-only based on the value of another field? Based on a status I'm looking to make a field Read-Only and then when it moves out of that status it should be read (with inline editing again).

Thanks!

Jeff
Photo of Jeff Rutter

Jeff Rutter

  • 1,162 Points 1k badge 2x thumb

Posted 3 years ago

  • 1
Photo of Skuidward Tentacles (Raymond)

Skuidward Tentacles (Raymond), Champion

  • 17,224 Points 10k badge 2x thumb
You can put the field on the Skuid layout twice and Mark one read only. Then you can put render conditions on each of the two duplicate fields so that only one of them shows at a time. The render conditions can be based on the value of another field.
Photo of Jeff Rutter

Jeff Rutter

  • 1,162 Points 1k badge 2x thumb
Thanks, Raymond for the help! I just realized I left out that I was curious about routes that used snippets and custom field renderers. This also works, and was just looking for other options and miss a crucial part of my question!

Thanks,

Jeff
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Jeff.  At the field level you conditionally enable a field (more than just rendering). Make it "disabled" for some status values, and "enabled" for others.  I believe this will get what you are after.  
Photo of Skuidward Tentacles (Raymond)

Skuidward Tentacles (Raymond), Champion

  • 17,224 Points 10k badge 2x thumb
This is better than mine.... You win this time...
Photo of Jeff Rutter

Jeff Rutter

  • 1,162 Points 1k badge 2x thumb
Thanks for the tip Rob! I hadn't used those options before!