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

fix TypeError: yiiActiveFormData is undefined #274

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

HZ-labs
Copy link

@HZ-labs HZ-labs commented Jan 18, 2019

yiiActiveForm is not so fast sometimes, you have run yiiDynamicForm only then yiiActiveForm is completed

`yiiActiveForm` is not so fast sometimes, needed run `yiiDynamicForm` only after `yiiActiveForm` is completed
@malchikovma
Copy link

My form submit listener ($('#file-form').on('beforeSubmit', function () {...}) didn't work because of this so i had to override whole file. Whole because some properties were private and I couldn't access them even through inheritance and I didn't want to make a fork.

mirkocapraraelite added a commit to mirkocapraraelite/yii2-dynamicform that referenced this pull request Sep 1, 2020
StitchUA added a commit to StitchUA/yii2-dynamicform that referenced this pull request Aug 16, 2021
@kwazaro
Copy link

kwazaro commented Sep 16, 2021

So, how to fix it??

@malchikovma
Copy link

So, how to fix it??

Either try the fork of StitchUA or override asset file of wbraganca like that, using changes from aaaa56d.

@kwazaro
Copy link

kwazaro commented Sep 16, 2021

 $js = 'jQuery("#' . $this->formId . '").yiiDynamicForm(' . $this->_hashVar .');' . "\n";
        $view->registerJs($js, $view::POS_LOAD);

This code runs inline script before the ActiveFormAsset is really loaded. I don't know how to deal with it...

@kwazaro
Copy link

kwazaro commented Sep 16, 2021

What should I change in composer.json, to use FORK?

anovsiradj added a commit to anovsiradj/yii2-dynamicform that referenced this pull request Oct 22, 2021
wait until `document.ready` not `window.load`.
<wbraganca#274>
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

Successfully merging this pull request may close these issues.

3 participants