Add field requirements to form

This commit is contained in:
Daniella / Tove 2022-01-17 18:23:34 +01:00 committed by GitHub
parent bb672c05b7
commit e66b4e8de5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -115,8 +115,8 @@
ret += `<a href="/post/${postid}">[Nevermind]</a>`
ret +=
`</div><post><div class="content"><form><label>` +
`<h3><input type="username" name="name" value="Anonymous">: <input type="text" name="title" placeholder="Title"></h3>` +
`<textarea name="content" placeholder="So basically, ..."></textarea><br/><br/><button type="submit">Submit</button>` +
`<h3><input type="username" name="name" value="Anonymous" required>: <input type="text" name="title" placeholder="Title" required></h3>` +
`<textarea name="content" placeholder="So basically, ..." required></textarea><br/><br/><button type="submit">Submit</button>` +
`</label></form></div></post>`
}
else