I'm been trying to find a free form submission service for the longest time. I was using google forms for the longest time but it's really ugly. It doesn't offer much in the way of customisation either. I finally came across something called Formspree and it's hard to believe that it's so easy to use! And it's free for 50 submissions a month! There's no way I'm going to get more than 50 submissions on my wee little portfolio site, so this suits me perfectly! Unfortunately the success page is a formspree page but hey, it's free. I can't complain. It makes me feel great when I manage to find workarounds 😁
A student wanted to create several tables with foreign keys linking them. He was placing the forms all over the place and that just didn't seem to make sense to me. I suggested that he link all the forms to one main registration page, and while he worked on it, I came up with my own solution that I feel rather proud of. Though I'm well aware it is a very simple solution. views.py def register (request): # form for team formteam = TeamForm(request.POST or None ) if formteam.is_valid(): formteam.save() return redirect( 'registerForTeam' ) else : print (formteam.errors) formteam = TeamForm() # form for coach formcoaches = CoachesForm(request.POST or None ) if formcoaches.is_valid(): formcoaches.save() return redirect( 'registerForTeam' ) else : print (formcoaches.errors) formcoaches = CoachesForm() # form for player formplayer = PlayersForm(request.POST or None ...
Comments
Post a Comment