What I need here is a multiple value field like in this tutorial.
Is there another way to do this with Playframework and scala template? If not, how do I get the values in the field once it is populated?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Play and its template system is nothing more than a way for generating required code (in very basic words) so yes it’s possible to use this tutorial in Play.
The tutorial you initially pointed contains everything you need, although it doesn’t describe required JSON format. Fortunately you can check included demo to see what they are generating with friends.php
Use Firebug or other similar tool to check what requests are sending to the server when you’re starting writing in the
To:field and also what does it return as a response.Now only thing you have to do is just create an action in Play which will return data in required format ie:
when it sends a request:
it receives the response (names beginning with given
term):How to prepare the JSON in Play’s action is described in last section of the JSON document