PromptClass on a checkbox

Aug 10, 2010 at 7:12 PM

I have been trying to apply specific styles to a Checkbox and I have noticed that the PromptClass property on a checkbox does not override the class attribute on the label once the checkbox is rendered on the page. At first I thought it was a bug (and it may be) so I made an update to the code. But the more I thought about it, the more I thought this may be the intended behavior: declaration looks like this:

 var agree = new CheckBox            
DisplayOrder = 80,                
ResponseTitle = "Agrees To Terms",                
Prompt = "I agree to all of the terms in the EULA.",                
PromptClass = "testClassName",                
Required = true,                
RequiredMessage = "You must agree to the EULA!"

what renders is:


<label class="MvcDynamicCheckboxPromptfor="MvcDynamicField_8">I agree to all of the terms in the EULA.</label>


Is that as expected or should I expect the class="testClassName"?

If the behavior is correct, is there a better way to do this? I have tried to add a Template to the checkbox that wraps it in a div but I have not had any luck implementing that (not sure that I get it ... so feel free to help me... )

Thanks for any input. I am really impressed with this project. It is very well done and VERY useful.

Best regards.


Aug 10, 2010 at 7:56 PM

Thanks, grungebob.

I'm investigating now....

Aug 10, 2010 at 8:04 PM

Fixed in Change Set ce20b1009586


Thanks, again!