Reduce Forms markup

Posted by Community Admin on 05-Aug-2018 04:05

Reduce Forms markup

All Replies

Posted by Community Admin on 02-Jun-2012 00:00

Couple things
1) This is what a radiobutton list looks like

<input type="radio" value="Poor" name="ctl00$contentPlaceHolder$C001$ctl00$ctl00$C017$ctl00$ctl00$radioButtons_radiobuttons" id="contentPlaceHolder_C001_ctl00_ctl00_C017_ctl00_ctl00_radioButtons_radiobuttons_1"><label for="contentPlaceHolder_C001_ctl00_ctl00_C017_ctl00_ctl00_radioButtons_radiobuttons_1">Poor</label><input type="radio" value="Fair" name="ctl00$contentPlaceHolder$C001$ctl00$ctl00$C017$ctl00$ctl00$radioButtons_radiobuttons" id="contentPlaceHolder_C001_ctl00_ctl00_C017_ctl00_ctl00_radioButtons_radiobuttons_2"><label for="contentPlaceHolder_C001_ctl00_ctl00_C017_ctl00_ctl00_radioButtons_radiobuttons_2">Fair</label><input type="radio" value="Good" name="ctl00$contentPlaceHolder$C001$ctl00$ctl00$C017$ctl00$ctl00$radioButtons_radiobuttons" id="contentPlaceHolder_C001_ctl00_ctl00_C017_ctl00_ctl00_radioButtons_radiobuttons_3"><label for="contentPlaceHolder_C001_ctl00_ctl00_C017_ctl00_ctl00_radioButtons_radiobuttons_3">Good</label><input type="radio" value="Very Good" name="ctl00$contentPlaceHolder$C001$ctl00$ctl00$C017$ctl00$ctl00$radioButtons_radiobuttons" id="contentPlaceHolder_C001_ctl00_ctl00_C017_ctl00_ctl00_radioButtons_radiobuttons_4"><label for="contentPlaceHolder_C001_ctl00_ctl00_C017_ctl00_ctl00_radioButtons_radiobuttons_4">Very Good</label><input type="radio" value="Exceptional" name="ctl00$contentPlaceHolder$C001$ctl00$ctl00$C017$ctl00$ctl00$radioButtons_radiobuttons" id="contentPlaceHolder_C001_ctl00_ctl00_C017_ctl00_ctl00_radioButtons_radiobuttons_5"><label for="contentPlaceHolder_C001_ctl00_ctl00_C017_ctl00_ctl00_radioButtons_radiobuttons_5">Exceptional</label><input type="radio" value="Excellent" name="ctl00$contentPlaceHolder$C001$ctl00$ctl00$C017$ctl00$ctl00$radioButtons_radiobuttons" id="contentPlaceHolder_C001_ctl00_ctl00_C017_ctl00_ctl00_radioButtons_radiobuttons_6"><label for="contentPlaceHolder_C001_ctl00_ctl00_C017_ctl00_ctl00_radioButtons_radiobuttons_6">Excellent</label></span>
...thats 6 items

You could drastically reduce it by removing the "for" attribute and just wrapping the inputs in the label.

2) The comments controls renders iteself out with a hidden link which I guess is to hide\show the comment.  Just don't render it if we don't want that functionality please.

3) What's with all the items having client templates?  Why isn't it rendered on the server?...or is it?

This thread is closed