Hi all,
I have an issue and even after searching for days it seems like I am the first one to have this problem. I want a form with a password field and via zapier this password and the e-mail will be submitted to a third party app so this one creates a new user with this given e-mail and password from the form. So, I thought millions of people already wanted to have this, but seems not.
After digging and digging, I could create the form with the password field and I managed to copy the value of the password field to another (hidden) field in this form so it will be submitted to zapier. All good.
Now I use the password strength. This third party app I want to use has its own characters allowed for a password.
So for a minimum there must be:
1 number
1 uppercase letter
1 lowercase letter
and at least 1 of the following: ! " # $ % ^ & * ( ) - _ + = / . ? \ [ ] | ` ~ @ ’
Ok, I started again digging and found the code of the password strength meter in the /wordpress/wp-content/plugins/gravityforms/js/gravityforms.js
There i changed the code with the code at the end of my message. At least it didnt give me a fault, but it seems that even typing more than 7 lowercase letters are fine to let gravity say its “strong” an lets it submit the form.
Anyone any idea?
// Password strength meter
function gformPasswordStrength( password1, password2 ) {
var shortPass = 1, badPass = 2, goodPass = 3, strongPass = 4, mismatch = 5, symbolSize = 0, natLog, score;
if(password1.length <=0)
return "blank";
// password 1 != password 2
if ( (password1 != password2) && password2.length > 0)
return "mismatch";
//password < 8
if ( password1.length < 8 )
return "short";
if ( password1.match(/[0-9]/) )
symbolSize +=20;
if ( password1.match(/[a-z]/) )
symbolSize +=20;
if ( password1.match(/[A-Z]/) )
symbolSize +=20;
if ( password1.match(/!" # $ % ^ & * ( ) - _ + = / . ? \ [ ] | ` ~ @ '/) )
symbolSize +=20;
natLog = Math.log( Math.pow(symbolSize, password1.length) );
score = natLog / Math.LN2;
if (score < 40 )
return "bad";
if (score < 80 )
return "good";
return "strong";
}
}