CMTV
Well-known member
Hi!
I have a modal with simple form in it:
Note
How this can be done?
I guess there should be an attribute or something like that to catch ajax form return.
In other words: how can I catch ajax form submit from JS?
I have a modal with simple form in it:
HTML:
<xf:if is="$isNew">
<xf:title>{{ phrase('CMTV_CB_add_param') }}</xf:title>
<xf:else />
<xf:title>{{ phrase('CMTV_CB_edit_param') }}</xf:title>
</xf:if>
<xf:form action="{{ link('criteria-builder/params/validateParam') }}" class="block" ajax="true" data-redirect="off">
<div class="block-container">
<div class="block-body">
<xf:textboxrow name="param_id" value="{$param_id}" label="{{ phrase('CMTV_CB_param_id') }}" />
<xf:textboxrow name="param_title" value="{$param_title}" label="{{ phrase('CMTV_CB_param_title') }}" />
</div>
<xf:submitrow icon="save" />
</div>
</xf:form>
Note
data-redirect="off"
. When I click "Save" button, some checkings are preformed in actionValidateParam
controller method. After that, I want to close the modal (it is closed automatically) and fire JS handler function from the page called opened this modal.How this can be done?
I guess there should be an attribute or something like that to catch ajax form return.
In other words: how can I catch ajax form submit from JS?
Last edited: