Suppose that i have a scala template that take single userName and age as input and submit that we can simply handle binding and passing form of class
Class FormExample {
String userName;
int age;
}
Now suppose user want one more button like add_more_user and when he clicked on add_more_user he will get new row where he can insert other userName and Age in same. And once he click on submit all username and age must be saved in databases.
My question is how to handle this dynamic functionality in scala template and inside controller so that once user click add_more_user button one new row appear and there he can add new userName and age and controller can received list of value once he click on submit button. I tried using list but not able to received value.
I am useing play2.4 and my controller code in java 1.8