I have an App called "Features"
In Features, I have these fields:
The app has two separate razor templates. One of the templates displays an image, and the other one does not.
How can I hide the "Image" field from Template B, but still display it in Template A? Is this possible with Formulas? If so, how?
Yes, this can be done with formulas ;) Best check out the current Content Templates, the basic-content (text/image) templates have exactly this implemented.
If you open it from a template which doesn't show images, the images-field is hidden (but the editor can reactivate it). So this is quite sophisticated, you can also do simpler implementations.
Basically the steps are:
VarShowImage
- probably default to true (so if it's not set, it's true when the form loads) https://docs.2sxc.org/basics/data/fields/ephemeral.htmlVarShowImage=false