Hello,
I've got this javascript error while trying to edit one of my fields :
Erreur : TypeError: value.replace is not a function
Fichier Source : http://localhost/wp-admin/admin.php?page=gf_edit_forms&id=1
Ligne : 3283
I'm using the following version of GravityForms :
Version PHP 5.3.6
Version MySQL 5.5.9
Version de WordPress 3.5.1
Version de Gravity Forms 1.6.12
And the field is a select prepopulated with Gravity Forms + Custom Post Types (http://wordpress.org/support/plugin/gravity-forms-custom-post-types)
It looks like the error comes from GetFieldChoices in js.php, line 866 you do this :
var value = field.enableChoiceValue ? field.choices[i].value : field.choices[i].text;
which in my case returns a number (the id of my custom post type), thus value.replace is undefined for Int typed variables.
Just replace this line with the following (cast to string) and we are good to go :
var value = field.enableChoiceValue ? String(field.choices[i].value) : field.choices[i].text;
Any chance to see this error fixed in a next release ?