I'm very new to Silverstripe and I'm trying to figure how to customize the form display for forms created using the userform module.
At first I though I'd be able to target elements using CSS but unfortunately, userform actually uses standard tags in the html output so that if I change "left" I change all form fields in silverstripe, i.e. The admin login fields and whatever else uses it.
Here's the output:
<div id="EditableTextField21" class="field text requiredField"><label class="left" for="Form_Form_EditableTextField21">My Form Field</label><div class="middleColumn"><input type="text" class="text requiredField" id="Form_Form_EditableTextField21" name="EditableTextField21" value="" /></div></div>
I want to target the <label> tag with CSS so I need to find a way to add custom IDs or classes to the form elements HTML out for each individual form but SS doesn't seem to provide an effective method for doing this.
What I did in the short term was add these tags around the Field name in the form builder <span id=form>Form Label</span> It worked but the output shows in the delivered email so that solution won't work for long.
I've looked at the code and googled but haven't been able to figure out where I can customize the code to simply add something like id="myfield" to the output.
Can anyone offer some advice?
Thanks in advance
G