But today, we are going to create a different instance of how we can create a separate file phone file
and we can store all the forms in that file and we can render the phone whenever required, whenever
required, without writing the repetition of the code.
So that brings some kind of an alternative solution, how we can create a phone and how we can submit
them.
So let's get started with this.
So I have two links so you can have a look at these links.
So I've opened the links on my browser as the first one is this.
So today the we are basically going to work in something this kind.
We are going to create a form in this search.
We have defined below how we can fetch the data from the phone to remove the special characters, any
special characters and widgets in the form so that basically there are different types of widgets once
it takes import number and put them in your password and an important day to day time time and put text
area, then some other also checkbox radius.
So there are five input.
So there's some like many options in the form and how you can render the form on the front end part
using it today.
They're going to work with a different solution.
So let's get started with this.
So what we do I have a quick recap of the last picture.
Like we lost, I open my file unstoppably file.
So like in the previous tutorial, I showed you that do you want to enter the form that was my form
and another one somewhere in the form.
So, well, I used to render a form using my file.
Then I used to submit that form and we used to move to this year and then we used it.
Then we had our back in logic.
Then we we can process the form data at this.
You are OK.
So today what we are going to do, we are only going to create a new one here and will only go to one
year are and work with in such a way that it will help us out to do both things.
So first what I do.
OK, ok.
And create a euro.
But I define my form.
Do I call a view function.
You start my form to.
And I'll define a name to it.
Name is equal to my full two.
OK, so I define find this in such a way that you don't get confused with the previous one.
So today we are going to work with my full two.
OK, know what I was going to do.
OK, this is my app file.
Inside my cab.
I create a new file with the name Foam's Dot.
OK.
So this looks pretty fine and what we are going to do, so I'm inside my films, my file, and I move
to this link.
OK, so today, the very first line you need to tape is from Django Import Forms.
OK, so what you need to do from Django import forms.
OK, so why I'm doing this, I will this will help and I would run my silver python manage, not be
white run.
So so this would help me to know if there's any such error.
OK, so tell me.
OK, so from Chanko import forms, I know you create a class for your form which will define highly
creative class class isela to feed back.
The feedback form.
OK, I have a small v. sorry feedback form, and what I'm going to do, I'm going to do forms dot form.
OK, so this is a syntax you need to follow.
OK, now you're done with this.
OK, now I'll define two things here.
One is the title.
OK, and another one, a subject, OK, so I'm going to define and what I'm going to do, I create I
coffee since foam's don't care field feel OK, I don't care.
Feel that this was pretty fine.
OK, I've defined to canefields here so I'll give a name, I'll give a label with the max length I define
the label is equal to.
Tighter.
OK, now this fight label is equal to.
Well, we can call it a subject.
Description,
description, subject, description, and I'll find a max scope length is equal to 50 for this and in
the same way I define.
Max Cleland is one to 200 for this.
OK, you know what I'm going to do?
I'm also going to add a different attribute here.
Here you can see that I can also define which it is able to form input.
OK, so I'll copy this.
And in this way, you're going to X and put it.
But this.
And for this one, what I do, I change to a text area.
OK, so if I'm not wrong, I'm great with the spelling.
Look at this.
This text area right here.
You can see this is dictated the state's input.
OK, so I have created the form successfully.
So this is the form.
What are you going to do from January?
Platforms, class feedback, form forms or form the deiter with the both of them having a label of the
subject being the text input and the text respectively.
Now, I moved when you started the fight and I will define.
Define.
My phone, too, will make a request as a barometer.
And before using this what I do, I die from DOT forms.
So basically I'm referring to this file from form Shopify import star so you can import every form you
want.
OK, know what I'm going to do and put the if condition, if requests.
Dark matter is equal to post.
OK, and just with the basic understanding I'm doing this to question method, is it going to get so
for the same role we are going to check if it's a request method plus get a.
OK, so if it was a cat matter, so what I'll do, I'll form a good form.
And that form was this was the name of my phone feedback form.
OK, so I have a feedback form on.
OK, so basically this is equivalent to this.
OK, so this is just for having just one and having this is equal to this and what I'm going to do now,
I'll execute a pass statement in just I'm giving a statement then it doesn't human error and I have
a form and what I do I don't render.
Request.
And helpful to find in my dictionary is able to form.
OK, and I'll post this for.
And I learned request and make up my phone to talk about Yemen and context is equal to my dictionary.
OK, I'm sorry, I'm wrong with the syntax.
No, this is fine.
But right now I'm want to find my phone.
Do not, Actimel.
OK, so I'll go to my templates folder and create a new file on my phone to call FEMA.
OK.
Now why do I extend my template so I'll have any page.
So suppose I have this is a second order statement.
OK, I'll have this page.
So basically right now what I'm doing.
OK, so I changed the title, my phone to OK.
What I do as grateful.
Now, that's it, I'm grateful, I know what I'm going to do, basically, I had rendered the form,
so just what I'm doing, I defined the logic when I get to the post method.
So define my form, do so.
If the request or method will post below, the final statement will define the logic.
But if the method is, it will create the form.
OK, we will get the form from that class and then we will render that form to my form to protect women
using the dictionary.
And now the same simply removed platform and simply typed form taught us under SCoPI.
OK, so I started my server.
Looking at this looks pretty fine, so this should work now.
No, I'll go to my local post.
So the server has started and I'll go to my phone to.
Oh, no, you can see like the form has been made, so I didn't quite correct the record.
So what I did, I used my phone should be my phone.
I had to find the title and subject.
I've already to find the text input as well as the text area.
Then I went to my store by we thought we were fine if the request was kept.
So I had initialized the form then I had rendered on the pitch, OK?
And then when I went to my FEMA page that I had without writing the estimate, I was able to successfully
add the form using the estimate of sorry, using this up by reading the phone book.
So what you can see.
So then the scope is as paragraphs.
OK, so when, when I move to my page so I simply the click on control plus you.
So this will give me this old school.
So what you can see here, the form has paragraph, text p p p.
OK, so this means for most rendered use in paragraphs.
OK, now what you can do I will type form a stable form are stable.
So when I move to my page.
Now, here you can see.
The phone has been rendered using a table, so table, row, table, heading table data, then table,
respectively.
OK, so this is right.
OK, I assume this OK, this is here.
You can see this had been rendered using a table, OK.
And when I did form and as B so this first paragraph.
So I'll also do this, refresh this page then control you.
So here you can see this first paragraph.
OK, you can see the paragraph and another also one you can do you can say for us the other.
So this will give unordered list.
So I'll refer this page so you can put it into an list.
So I simply control plus you know, and you can see here you can see here's the form.
Yes.
Here's the form.
You can see a list has been declared list list item list item when the form has been rendered using
list.
So in the next year or two we are going to continue with this.
And then I will tell you the basic part where we if the request, have the post.
So what I'm going to tell you is the full will be submitted on.
So what would happen?
So next, we would actually try to style up this form as well as how we can render the errors and how
we can fix the clean data and how when you get to check the validity of the form.
So this would help us really.