Jan 30, 2023

Hidden fields

Dromo's family of hooks allow you to programatically validate and transform your user's imported data using any logic you can dream of. You can use hooks in conjunction with virtual fields to compute and store derived data from the imported file.

Sometimes, you may not wish to show these virtual fields to your users.

For example, suppose you are importing a CSV of addresses with fields for street address, city, postal code, and so on. You could use a row hook to connect with a geocoding service to get a latitude and longitude for each address. You want to import these corresponding coordinates, but you don't want your user to be able to see or edit them.

This is the kind of problem that hidden fields solve. They allow you to attach internal metadata to your imports, without displaying it to the user.

And they are super easy to use! Just pass the hidden attribute when defining your field, either in your base schema or with the addField method.

© 2024 Dromo

Subscribe