<lift:Customer.newCustomer form="POST"> <div><newCustomer:firstName></newCustomer:firstName></div><lift:msg id="firstNameError"/> <div><newCustomer:lastName></newCustomer:lastName></div><lift:msg id="lastNameError"/> <div><newCustomer:submit /></div> </lift:Customer.newCustomer>
In your snippet when you need to set the error message just call: S.error("firstname", "an error message") br's, Marius On Jun 26, 3:10 am, Trav <wilhel...@gmail.com> wrote: > I have a form such as: > > <lift:Customer.newCustomer form="POST"> > <div><newCustomer:firstName></newCustomer:firstName></div> > <div><newCustomer:lastName></newCustomer:lastName></div> > <div><newCustomer:submit /></div> > </lift:Customer.newCustomer> > > and a bind: > > bind("newCustomer", xhtml, > "firstName" -> text(XXX), > "lastName" -> text(XXX), > "submit" -> submit(XXX) > ) > > If I want to require that both first and last name are required, but > the form is submitted with no last name, how anyone suggest that I put > the error message "*Required" in the appropriate div tag next to the > text box. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~----------~----~----~----~------~----~------~--~---