lots that belongsTo a collection buildings and a collection owners. If when I create a lot, the owner and building record it should belong to do not exist yet, I want to have input fields available in the lot create form so I can create them along with the lot in a single API call.
Add smart fields that will be used as input fields in the form
You can declare smart fields that will not be meant to display any information but solely to serve as input fields. In my example the fields are declared as follows in theforest/lots.js file:
When you add the fields, you can hide them in the UI and make them visible only in the create form. As you want the user to be able to search within the existing records of the parent collection you can keep the reference fields natively generated. But if the records don’t exist they can fill in the input fields.
<aside> 💡 You need to make the smart fields as editable by disabling the read only parameters in the field settings
</aside>
Demo video available here ⇒https://www.loom.com/share/da44ee3c886e4f90a7768fdbfe4b462d?from_recorder=1