I am passing a form from my template to views, with some text inputs and a input type button as follow:

<input type="submit" name="submit_btn" value="Continue">

But in my views when I do


It return none. Also when I do :


It return all values except the 'submit_btn'

Please HELP!

2 Answers

Higor Rossato On

You should do request.data.get('submit_btn') instead. Or even request.POST.get('submit_btn')(depending how you're doing that on your views.py) What you're looking to access is the the button/input by "name"

FightWithCode On

I still did not got any solution on why this is happening but after following this question

I was able to solve my problem by passing a other hidden input with the same value and submit name.