Suppose I have a modal window with ActiveForm in it.
Is it OK to use
<?php $this->beginPage(); ?>
<?php $this->beginBody(); ?>
<!-- MODAL CONTENT HERE -->
<?php $this->endBody(); ?>
<?php $this->endPage(); ?>
inside partials, or there’s much better way (for example, direct access to registered code block)?
STATUS UPDATE: Now this issue is fixed by new function renderAjax.
i think you can resgister the asset bundle for ther active form in ther parent page and in the partial view you just call the method for activeform plugin
different forms can be loaded into this modal
client validation is different for every form, so different js code must be registered.
Right now I’m using beginPage/endPage inside my partials, works fine.
Just wondering if there’s a better way.
I mean you just add the validate.form.js and active.form.js in parent page, and in the partial view you just add
Yes, this is the expected way. We probably will introduce some helper method to simplify this. Could you create a github ticket about this? Thanks.