Answer the question
In order to leave comments, you need to log in
Yii2 how to get response from server in js using Active Form?
I have a form with this configuration:
{% set form = active_form_begin({
'options' : {
'id' : 'form-create-market',
'class' : 'form-horizontal',
},
'enableAjaxValidation' : true,
'enableClientValidation' : false,
}) %}
...
<div class="form-group text-center">
<input type="submit" name="button" id="button-create-market" value="{{ t('markets.main', 'CREATE_MARKET') }}" class="btn btn-primary" />
</div>
{{ active_form_end() }}
Answer the question
In order to leave comments, you need to log in
But when the validation is passed and I do certain actions, the server should give the answer that I want to get in the js code.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question