JSFiddle - React, Tailwind, and code Playground
HTML
<!-- just hide the second form -->
<form class="test1">
<input id="foo1" name="style" value="bar1"/>
</form>
<form class="test1">
<input id="foo2" name="bar" value="bar2"/>
</form>
<!-- hides both forms -->
<form class="test2">
<input id="foo3" name="bar" value="bar3"/>
</form>
<form class="test2">
<input id="foo4" name="style" value="bar4"/>
</form>
<!-- hide sometimes -->
<form class="test3">
<input id="foo5" name="style" value="bar5"/>
</form>
JavaScript
$( ".test1" ).hide();
$( ".test2" ).hide();
$( ".test3" ).hide();