How to display the selected radio after failed to submit a form

Hi All,

I understand that when I use a generic class based view, I can put form as argument when form_invalid happened, but how to display the selected radio after user failed to submit form?
It’s automatic in text.
BTW, I don’t find a good way to google this question…

class SlipCreate(CreateView):
form_class = NewSlipForm
template_name = ‘new_export_slip.html’
success_url = ‘insurance_slips’

def form_valid(self, form):
    return HttpResponse("OK")

def form_invalid(self, form):
    **return render(self.request, 'new_export_slip.html', {'form': form})**