Commit 0c4adc21 0c4adc2183552c1b06b041b88ba61c712c598f70 by Matt Bowman

Add the ability to find named elements or IDs inside of forms when using the fil…

…l method. This change gives priority to the name attribute, but in the event it isn't able to find an element, it tries again using the ID.
1 parent 71c7e2c7
...@@ -226,7 +226,7 @@ ...@@ -226,7 +226,7 @@
226 if (!vals.hasOwnProperty(name)) { 226 if (!vals.hasOwnProperty(name)) {
227 continue; 227 continue;
228 } 228 }
229 var field = this.findAll('[name="' + name + '"]', form); 229 var field = this.findAll('[name="' + name + '"]', form) || this.findAll('#' + name, form);
230 var value = vals[name]; 230 var value = vals[name];
231 if (!field || field.length === 0) { 231 if (!field || field.length === 0) {
232 out.errors.push('no field named "' + name + '" in form'); 232 out.errors.push('no field named "' + name + '" in form');
......