JSFiddle - React, Tailwind, and code Playground
HTML
<form id="myform">
<input type="text" value="bar" name="bar" />
<select name="sel">
<option>foo</option>
</select>
<input type="text" value="foo" name="foo" />
<input type="password" />
</form>
JavaScript
var allEls = document.id('myform').getChildren().filter(function(el) {
var tag = el.get("tag"), type = el.get("type");
return tag == "select" || (tag == "input" && type == "text");
});
console.log(allEls);