Login Retreive lost passwordRegister
Search

Forum Index / General / Labels, date fields, and code validation

[ This topic is solved ]

  xymod 25 April 10 / 20:52  
Hi

Just wondering how the code can be changed to make the label markup validate for $form -> DateField.
Currently it adds <label for="idname"> but this id does not exist within the form which causes validation warnings, and also isn't fully accessible.
I could wrap this date field with a $form -> borderStart to bind the date select boxes together logically, but the form still needs the label for the individual select boxes e.g.<label for="idname_day">Day: </label>. I would could hide these using css if required.
Any thoughts on this?

  Johan Wiegel (Admin) 26 April 10 / 08:18  
you can alter the mask for that specific field by using setmask.

  xymod 27 April 10 / 23:55  
Hi - I was already trying this with the time fields: so far i have

$form->setMask("<div class='time'>\n\n".
                "<label>%title% %seperator% \n".
                " %field% </label> %help% \n".
                " %error%\n\n".
                "</div>\n\n", 
false);
$form -> TimeField("Time","startTime",null,null,24,null);

However I cannot work out how to actually add a label for the hour select and a label for the minute select...

  Johan Wiegel (Admin) 28 April 10 / 08:07  
That is not posible.

(BTW better to place %field% outside the label.)

  Top


powered by PHP-GLOBE   © 2004 - 2012 FormHandler. All rights reserved.   -   Open source license