F
Filament15mo ago
Augus

Create 'check' step inside wizard.

How would i approach adding an 'check' step inside a wizard? - The user needs to confirm the data he/she filled in. - I need to be able to call an function based on the form fields to show an error message or primary message on the last step. Is there a confirm step i can use or ideally create a last step within the wizard? I tried this with placeholder fields in a last step but since the function i want to call makes an API call i only want to call this in the end and not on every wizard step (what it's doing now).
1 Reply
Augus
AugusOP15mo ago
To explain it a bit more in detail, in my last step i now got Placeholder fields with the filled in data, and one with the API call which returns if we were to send this data to the endpoint it would be accepted or not. In my form i can check if all fields are set before i make the API call and display the result with the Placeholder, or even with: https://filamentphp.com/plugins/awcodes-shout i think. But it for one feels kinda "hacking" and im not sure if i would be able to create a button where the user can accept that the API call would fail but they still want to go on (the data is also stored/processed inside my application). Ideally i would have an overview page as last step with the user seeing all the filled in data, either an succes or fail banner for the API call and an accept, accept with failed API call and cancel button.
Want results from more Discord servers?
Add your server