Hi all, I have a situation where I’m attempting to replicate a new theme for our organization within Wordpress. The form elements for the new theme are a bit wonky and use some custom svg animations that are held within the label element.
For instance. I have a regular checkbox, this is the HTML output for that checkbox.
<input class="gfield-choice-input" name="input_17.1" type="checkbox" value="First Choice" id="choice_1_17_1" />
<label for="choice_1_17_1" id="label_1_17_1" class="gform-field-label gform-field-label--type-inline">First Choice</label>
I need to inject the following into EVERY checkbox for every form, site wide.
<span class="checkbox" role="none">
<svg class="brei-icon brei-icon-check" focusable="false">
<use xlink:href="#brei-icon-check"></use>
</svg>
</span>
So the resulting HTML generated should look like…
<input class="gfield-choice-input" name="input_17.1" type="checkbox" value="First Choice" id="choice_1_17_1" />
<label for="choice_1_17_1" id="label_1_17_1" class="gform-field-label gform-field-label--type-inline">
First Choice
<span class="checkbox" role="none">
<svg class="brei-icon brei-icon-check" focusable="false">
<use xlink:href="#brei-icon-check"></use>
</svg>
</span>
</label>```