A
A
alex4answ2019-03-16 10:18:52
Yii
alex4answ, 2019-03-16 10:18:52

How to add data before submitting ActiveForm on client?

Good afternoon, I'm sure the noob question is just awful, but I'm a little confused and don't understand how to do it.
In general, there is activeForm, and there is content that the user creates, js is generated.
This data is not form fields, it's just json objects, but I need to pass it along with the form on submit.
How to do it so as not to abandon activeForm ?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Bay, 2019-03-16
@alex4answ

1) event beforeSubmit
2) as the js event occurs, immediately write to the hidden field in the form.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question