Custom Field with Wizard
Hi,
I would like to build a custom field that checks the inserted data from other fields against an API.
How can I build this, so the user can't go to the next step until my API returns something positive?
Thank you!
10 Replies
what about
Step::()->afterValidation()
?uh it's not documented is it? How am I supposed to use it, because I don't understand how I can return true from my custom component and use that afterValidateion callback.
I'm sorry for being confused.
Can you explain more about the custom field?
actually I am not sure if I even need it. I just want to run a method from my API service and it either returns true or false.
While it's being checked or returns false the user can't go further in the wizard.
where/when would you like to trigger the method/api?
could it be a prefix/suffixAction?
If the user goes to step 2 (so, after he/she inserted the necessary data)
You can use Step1->afterValidation I think
but I think that's just a hook to do something after validation but you can't really disable the next step button etc.
let me elaborate an example
Something like this:
Nice will try it out later thanks π