Markup for a required form field is as follows:
<div class="hs_email field hs-form-field"> <label> <span>Email</span> <span class="hs-form-required">*</span> </label> <div class="hs-field-desc"></div> <div class="input"> <input class="hs-input" name="email" placeholder="" required="" type="email" value="email@example.com"> </div> </div>
I need to apply styles to the
.input div of a required field, the same way as I could to an email field using
.hs_email .input as a selector. As of now it is not possible to target required fields except the
input itself or the
span inside the label.
A class on the parent element like
.hs-required would be very convenient. Selecting by ID is not practical for my use case as there are multiple required fields in multiple forms. Is there a way to work around this?