Ryan Oh
Ryan Oh

Reputation: 657

how to switch input formats in a single page, with django?

So I'm a beginner in Django and having trouble in creating a function.
What I'm trying to do is this : It is basically an input page, with two radiobuttons-(1) Full text (2) Simple text. So if the user clicks the "Full Text" button, a large textarea is displayed and he/she can input long texts. If the user clicks the "Simple Text" button, one small textarea shows up and he/she can input, say, one sentence. In short, the input field switches with the radio button.

+ There is a '+' button in the latter, so the if the user clicks '+' button he/she will get additional textarea, as many as he wants. Like the form of tag.

I have no idea on how to write this code.
I'm not sure if my description is clear enough, but I very much appreciate your help :)

Upvotes: 0

Views: 44

Answers (1)

Luiz
Luiz

Reputation: 2065

Good morning sir, there is no way to accomplish this with django or another back-end framework, to do this you need to search some javascript to handle the changes on your radio button and the + button.

Something like this

Upvotes: 1

Related Questions