Cheers! Would this work? Im so used ot PHP, i keep thinking in it.
if request.metho == 'POST' && 'Lived_Out_Uk' in request.POST: Would that work? On 5 Aug, 09:22, Wayne Koorts <wkoo...@gmail.com> wrote: > Hi, > > > I need some support with something, i have the following boolean field > > but if you submit the form without choosing an answer it kicks back an > > error because i have the following IF Statment to make sure when it is > > selected other fields are mandatory. HEres the code. > > Instead of this line: > > if request.POST['Lived_Out_Uk'] == '1': > > Use this: > > if 'Lived_Out_Uk' in request.POST: > > Regards, > Wayne Koortshttp://www.wkoorts.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---