[Tutorial] Build Playframework's Form submission/validation with a Javascript framework

Hello!

I’d like to share our approach of building Playframework’s form submission/validation with a Javascript framework.

Here’s the link: https://give.engineering/2018/09/15/form-submission-and-validation-in-playframework.html

Some highlights:

  • The official documentation (https://www.playframework.com/documentation/2.6.x/ScalaForms) focuses more on building a traditional form. Our blog focuses on building a form with Vue.
  • We eventually built our own form library because play.api.data.Form isn’t fully compatible with JSON. We explain the detail in the blog post. We’d love to help get play.api.data.Form to be fully compatible with JSON

If you have questions, please don’t hesitate to ask.

Thank you,
Tanin

1 Like

Thanks for sharing, @tanin47.

And also, nice work with play-json-form. You should add it to our module directory. ;-)

Best.

1 Like

@marcospereira Thank you!

I am hoping that we might be able to work together to get Play’s form to be fully compatible with JSON.

The crucial part is changing the return type of Mapping.unbind to JsValue (or JsObject). Then, we can offer a helper to convert from JsValue to Mapping[String, String] to make it backward-compatible.

I wonder if this sounds good and how we can discuss further to make this happen.