So the last page we need to make is one that actually allows the user to make a reservation, so they
go to the website, they find the search, they search for the dates.
Those dates are available.
Then there they get taken to the page to make a reservation.
So we have to make a page for that.
So I'll create a new file, which I will call make a reservation.
And again, we have to cut this up into our templates at some point or go templates, but I'm not worried
about that yet.
So I'm going to do is copy the contact page, which is currently mostly empty and pasted in here.
And I'll find the section where I actually have the content right here and I will make this my form.
OK, so what do we need?
First thing we need is a title.
Each one I'll just call this make a reservation and then I need to have a form form.
Method equals post.
I want to post this and I want to post it somewhere.
Action equals I'll leave that empty for now because we haven't set up a route in our go code to handle
that.
And it will be class needs validation because I want to use my client side validation.
That means I need to put no validate in there.
There's my opening and closing form.
Now, what kind of information do we need?
We probably need more than we're actually going to put it into this form because we just want to build
a form and make it work and we can improve it later.
So for right now, let's go with div class equals form group to hold my form input and I want this to
be pushed down a little bit, so I'll give it a margin at the top of five and inside of that or create
a label.
I want to know their first name and I'll make that for equals first name and underneath that I will
have an input input type equals text name equals first name.
ID equals first name.
And do I need anything else in there?
I'm going to put one more in there.
I want to make it required obviously, because I want their first name and I'm also going to put autocomplete.
Equalised off, I don't want it to automatically start typing whatever they typed in the first name
on some other form somewhere else, I'm just going to put that in there.
Sometimes it works.
It works really well, except Chrome sometimes causes grief.
But I'm going to put it in there.
It's not going to hurt anything.
So I have a first name.
Now, let's copy that and paste it and put it in their last name, which will be your last name and
will copy that and pasted here and pasted here.
Good.
Then I'll copy this whole thing.
I want their first name.
I want their last name.
Let's get their email address and their phone number.
I don't need to merge emergent top here.
Let's get rid of that.
I don't need to merge on top here.
I just want to push the first one down.
So email of type, email, name of email, ID of email for email and we'll copy this whole thing and
do one for phone and phone is of type or for phone type text name.
Phone ID is phone and I need to way to submit the form.
So let's put a horizontal rule in there and just put in a button.
Input type equals submit class equals button button primary to give it a nice bootstrap primary button
and a value make reservation.
All right, let's save that and open it up in Firefox and see what it looks like.
So it comes.
Something's wrong there.
It doesn't look quite right, class equals form control on my input.
Class equals form control, let's copy that and paste it and pasted their pasted their paste pasted.
Save this, go back, reload that that looks better, kind of fix my level where I said email.
I have to put phone phone number.
Perfect.
So there I think we have all the content we need to start cutting our pages up and doing something useful
with them.
But first, let's add some JavaScript and some nice styling.