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

Remove last break when only one #30

Open
lechuky opened this issue Mar 17, 2014 · 1 comment
Open

Remove last break when only one #30

lechuky opened this issue Mar 17, 2014 · 1 comment

Comments

@lechuky
Copy link

lechuky commented Mar 17, 2014

Hi,

Remove last when is only one breaks.
If there is only one form and minFormsCount is set to 1
you can delete it anyhow. The problem is the count of de forms is 29 show 29 > 1 it let delete de form.

@lechuky
Copy link
Author

lechuky commented Mar 18, 2014

Have found de solution:

In the funcion count check if x is numeric: if (jQuery.isNumeric(x) && forms[x] ) {

function count()
{
if (forms.length > 0) {
var count = 0;
var x = [];
for (x in forms) {
console.log("La X es: "+x);
if (jQuery.isNumeric(x) && forms[x] ) {
count++;
}
}
console.log("Count: "+count);
return count;
} else {
return 0;
}
}

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

1 participant