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

Kartik Number Control. #296

Open
stovesy opened this issue Sep 2, 2019 · 3 comments
Open

Kartik Number Control. #296

stovesy opened this issue Sep 2, 2019 · 3 comments

Comments

@stovesy
Copy link

stovesy commented Sep 2, 2019

Has anyone made any modifications to DynamicForm to get the Kartik Number control working?

Validation fails and the mask function does not copy to a new form entry.

Thanks

@senemgenberova
Copy link

Did you find any solution?

@stovesy
Copy link
Author

stovesy commented Nov 22, 2019 via email

@Fendyanto
Copy link

i got this solution from https://demos.krajee.com/number#comments

Try to put following code in yii-dynamic-form.js (remember to delete web/assets files to make it effect)

// "kartik-v/yii2-numbercontrol"
var $hasNumberControl = $(widgetOptionsRoot.widgetItem).find('[data-krajee-numbercontrol]');
if ($hasNumberControl.length > 0) {
$hasNumberControl.each(function() {
var configNumberControl = eval($(this).attr('data-krajee-numbercontrol'));
configNumberControl.displayId = $(this).parent().prev().attr('id');
if ($(this).data('numberControl')) { $(this).numberControl('destroy'); }
$(this).numberControl(configNumberControl);
});
}

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

No branches or pull requests

3 participants