Brilliant thanks for that. Matt
On Sunday, 13 May 2012 15:53:19 UTC+12, Anthony wrote: > > http://web2py.com/books/default/chapter/29/7#Hide-errors > > Anthony > > On Saturday, May 12, 2012 11:35:52 PM UTC-4, Matt wrote: >> >> Hi Everybody, >> >> I'm using bootstrap for a project with web2py. >> >> I want to create forms that mirror the standard approach taken by the >> bootstrap framework. >> >> They wrap each "control" like so: >> >> <div class="control-group error"> >> <label class="control-label" for="inputError">Input with >> error</label> >> <div class="controls"> >> <input type="text" id="inputError"> >> <span class="help-inline">Please correct the error</span> >> <p class="help-block">A comment for the field goes here.</p> >> </div> >> </div> >> >> Since this is custom code I using form.custom and form.fields for output >> the HTML myself. >> >> One small problem I've run up against in that when I do the following: >> >> {{= form.custom.widget.full_name }} >> >> If there is a form _error_ the following is output: >> >> <input class="invalidinput" id="xyz_full_name" name="full_name" >> type="text" value=""> >> *<div class="error" id="full_name__error">please enter their full >> name</div>* >> * >> * >> Is there anyway to suppress the div or change it so that it can become >> >> *<span class="help-inline">please enter their full name**</span>* >> * >> * >> Instead? >> >> Any help or suggestion for this would be greatly appreciated. >> >> Thanks in advance, >> Matt >> >>