Get field type in templates I need to get the field type in my templates like I used to do: field.getField.type but that does not seem to be working in Craft 3 anymore. The result is always null. It also seems that the »type« column is gone completely from the craft_fields table.
How do I get the field type in Craft 3?
There might be other ways, but here's one possibility:
{{ craft.app.fields.getFieldByHandle('yourFieldHandle').className() }}

This will return a string of craft\fields\PlainText, craft\fields\Lightswitch etc, which you can then use in conditionals/switch statements.