Skip to content

Commit

Permalink
Add support for placeholder as fallback #3001
Browse files Browse the repository at this point in the history
  • Loading branch information
jlukic committed Sep 13, 2015
1 parent ad62a7f commit 72639db
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/definitions/behaviors/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -367,10 +367,9 @@ $.fn.form = function(parameters) {
}
if(requiresName) {
$label = $field.closest(selector.group).find('label').eq(0);
console.log($field, $field.closest(selector.group));
name = ($label.size() == 1)
? $label.text()
: settings.text.unspecifiedField
: $field.prop('placeholder') || settings.text.unspecifiedField
;
prompt = prompt.replace('{name}', name);
}
Expand Down

0 comments on commit 72639db

Please sign in to comment.