So what we'll do now is we'll use our former status to decide whether or not the step has been completed
instead of just the fact the users clicked onto the next step inside here.
So we head back to Vaskov.
And what we'll do, I'm just going to clean up the tabs again, quite busy at the top and we'll open
up our checkout component, XHTML.
And this is where we've got our CDK steps.
And what we can also do inside our steps is use the completed input's property.
And what we can do is set this to whether or not something is valid, such as our form, so our completed
is going to be true or false and it will take our form status here.
So what we can do is add some parentheses and we can say our check out form.
And what we want to get here specifically is our address form.
And then we can simply say dot valid.
And if we go back and take a look at our browser, then we can refresh the page because that should
be reset to false.
And if we go to delivery, this stays as false, and if we then go and complete all the required properties,
what we should see is it changes to true.
So now we've got control over when a step is completed and what we'll do is we'll just do the same for
the delivery as well.
And that's just copy what we've done here and paste this in our delivery stat.
And instead of a form, this is going to be delivery for.
And let's move this down.
And our review doesn't actually have a form associated with it, so we'll just leave that alone for
now.
And if we go back to the browser and what we should see.
Is that we can still click, we haven't prevented that functionality, but both of these are set to
complete, completed as false, and it's only when we input all the properties that we get completed
as true.
And if we go to delivery and we select an option, then this updates to two now as well.
So this is what we're looking for and we've still yet to implement the controls over here.
So I am aware that it's we're going to regardless of their completeness, we can go straight to the
end if we want to.
We're not going to enable linear mode yet.
Whilst we're still working on the components, it's quite convenient to be able to click around to the
different areas whilst we're coding this functionality.
And what will take a look at next is the address, because we want to get the user's address from the
server if we have it, and populate that in our form.
And we'll take a look at that next.