dimanche 12 avril 2015

Play Framework - Remove empty form entries

I have a Play! 2.3 Form object that is being bound from the request. The Form object basically looks like this:



val languagesForm = Form(
mapping(
"languages" -> list(text)
)(apply)(unapply)
)


I have some jQuery code that adds a new languages[1] to my HTML form but there will always be an empty input submitted which Play! includes as an entry. How do I remove these empty entries?


Aucun commentaire:

Enregistrer un commentaire