craft-preparse-field
craft-preparse-field copied to clipboard
Getting ID of field in a Volume Field Layout
If I'm using the Preparse Field inside of a Field Layout for a Volume, how do I access the ID of the field that is using that Volume? I'm trying to transform an image based on the field that is being used.
So for a heroImage
assets field the Preparse Field would use a landscape
transform while a portraitImage
assets field would use a portrait
transform.
Basically, I want the Preparse Field to be reusable across assets fields using the same Volume, but provide different transform sizes depending on the assets field.