Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8221229
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T13:50:04+00:00 2026-06-07T13:50:04+00:00

I am writing a change password form, and I would like to pass the

  • 0

I am writing a change password form, and I would like to pass the original password to the form for validation purposes, but the only way to do that is to make it a hidden field and pass it in with the rest of the data. I obviously don’t want to do that, I’d rather just pass it to the form constructor from within the view, but if it’s not passed in with the formdata then that won’t work.

class MyForm(Form):
    ...
    original_password = HiddenField()
    ...

    def validate_current_password(form, field):
        if field.data != form.original_password.data:
            ERROR

form = MyForm(request.POST, original_password=password) Does not work unless request.POST is empty, or unless I actually render and submit the original password with the form. form.original_password.data is empty otherwise.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T13:50:05+00:00Added an answer on June 7, 2026 at 1:50 pm

    For those of you familiar with formencode’s “state” variable, I solved this by subclassing Form and adding a state variable with information to assist in validation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing a forum-type discussion board in Perl and would like to change automatically
I'm writing a small application that includes a password change function with validators for
I am writing a Function that has a return-type which will dynamically change depending
I'm writing a script in PHP to allow a user to change their password.
I am writing a JSF page, where user can change his password. I based
I'm writing a powershell v2 script that I'd like to run against a remote
I'm writing a function to enable the users to change their password. public function
I am having trouble writing a stored procedure that first checks a hashed password
I'm writing a DLL to change permissions on a folder and everything underneath the
I am writing an application which is going to allows users to change the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.