Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send multiple value from a form to Play server #360

Open
plouf142 opened this issue Oct 10, 2024 · 0 comments
Open

Send multiple value from a form to Play server #360

plouf142 opened this issue Oct 10, 2024 · 0 comments

Comments

@plouf142
Copy link

Hello,

I builds a form to serve a play server. This framework use this method to get multiple values

So, with setValueAsArray property to true, I have to get this script before sending data :

let form = new FormData(htmlContent);
if (!!form.get("vs_input_value"))
  JSON.parse(form.get("vs_input_value")).forEach((u, i) =>
    form.set(`vs_input_value[${i}].id`, u)
  );

Is there a better method?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant