Retrieving form data after setting initial value
<p>I wanted to populate my form fields with initial data, so I've set my view just like recommended by @ars in <a href="http://stackoverflow.com/questions/3833403/initial-populating-on-django-forms">this question</a>:</p>

<pre><code>def update_member(request):
    if request.method == 'POST':
        urn = 'urn:publicid:myurn'
        member = Member(urn=urn)
        retrieved_members = member.search_member(filter_params=['urn', 'first_name', 'last_name'])

        # If search returns member
        if retrieved_members != []:
            member = retrieved_members[0]
            member_attributes = {'first_name': member.first_name, 'last_name': member.last_name}

            form = UpdateMemberForm(initial=member_attributes)
</code></pre>

<p>And it works properly. But when I manually fill in the fields in the template, my view still sets those initial values. I cannot reset the values as the ones passed via POST method. I know this happens because of the way I set the initial values, but I don't know how I could fix it. </p>

<p>Does anyone has an idea of how I could solve this?</p>

<p>If you check the POST data for values submitted, you can update member_attributes with those values before calling UpdateMemberForm()</p>

python django