I'm trying to create the following simple form with Pug:
<body>
<form action="/add_movie" method="POST">
<p>
title: <input type="text" name="title" value=""/>
year: <input type="text" name="year" value=""/>
imdb: <input type="text" name="imdb" value=""/>
</p>
<input type="submit" value="Submit"/>
</form>
</body>
But I can't make the form work with only one p
tag. Here is what I came up with instead:
body
h1= "Add a movie!"
form(action="/new_movie" method="POST")
p Title:
input(type="text" name="title" placeholder="")
p Year:
input(type="text" name="year" placeholder="")
p imdb:
input(type="text" name="imdb" placeholder="")
input(type="submit")
Is there a way, to re-create the original HTML form in Pug within one p
tag?
.pug
would be helpful for us webdev n00bs. Thanks! – Nolitta