Customizing Error Messages in Xano and Handling Uploads with Uploadcare and Webflow
During the meeting, the State Changers discussed two main topics.
The first topic was about validating required fields in Xano and customizing error messages. One participant had set certain fields to be required in Xano but was encountering technical error messages when they were empty. They wanted to know if it was possible to customize the error messages in Xano or if they had to use conditional statements to set custom error messages. The group concluded that in order to customize the error messages, they would need to set the fields as nullable and then add a precondition in their function stack to check if the desired value was missing, and then send a custom error message based on the condition.
The second topic discussed was about handling file uploads in a web form. One participant wanted to use an upload button to upload a PDF certificate at the bottom of a form. They were considering using Uploadcare for this purpose and wondered how to link the uploaded file with the form submission. The group suggested using the ID returned by Uploadcare and embedding it in a hidden field in the form. This way, the ID would be submitted along with the rest of the form data, and they could reference the uploaded file using the ID. They also discussed using client-side validation to prevent form submission until the upload process is complete.
Towards the end of the meeting, one participant asked about performing math calculations on aggregated data in Xano. They had an aggregate function that returned two values, and they wanted to perform calculations on these values separately. The group explained that it would depend on the reliability of the data. If they trusted the data to always contain both values in the same order, they could directly reference the values using dot notation. However, if there was a possibility of missing values or a different order, they suggested using a filter called "create object from entries" to convert the data into a more structured format for easier manipulation.
Overall, the meeting provided insights on customizing error messages, handling file uploads, and performing calculations on aggregated data in Xano.