Page 1 of 1

CGBetterForms radio button Label errors

Posted: Mon Jul 01, 2019 6:19 am
by Simon66
When I scan my form I get multiple errors about missing labels on all radio buttons.

This is my code:

Code: Select all

<div class="option-group field">
	<div class="smart-option-group smart-option-list group-vertical"> 
		<label for="male" class="option">
			<input type="radio" name="gender" id="male" value="Male" data-cgbf-label='gender'>
			<span class="smart-option smart-radio">
				<span class="smart-option-ui"> 
					<i class="iconc"></i> Male
				</span>                                  
			</span>
		</label>
		<label for="female" class="option">
			<input type="radio" name="gender" id="female" value="Female">
			<span class="smart-option smart-radio">
				<span class="smart-option-ui"> 
					<i class="iconc"></i> Female
				</span>                                  
			</span>                  
		</label>                            
	</div>
</div>
The messages read:
Could not find a label for field "gender" at about line 42.
Could not find a label for field "gender" at about line 51.
I've tried using the data-cgbf-label on the first radio input but it doesn't seem to work.

Does anybody know how to make these radio buttons scan correctly without errors?

Cheers
Simon66

Re: CGBetterForms radio button Label errors

Posted: Mon Jul 01, 2019 2:32 pm
by calguy1000
i found a small adjustment to make in the form scanning process.
but in the mean time, try using data-cgbf-human instead of data-cgbf-label

Re: CGBetterForms radio button Label errors

Posted: Mon Jul 01, 2019 9:56 pm
by Simon66
Thanks Calguy!