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

  • Home
  • SEARCH
  • 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 98309
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T00:10:17+00:00 2026-05-11T00:10:17+00:00

We have a web application that is based around a form that gets passed

  • 0

We have a web application that is based around a form that gets passed around. Unfortunately when people look at it, it is editable. So two people can edit it at the same time and overwrite their changes. How would you go about locking the form (and any multiple parts of the same form because it is broken down into multiple pages) down so only one person can edit it at a time?

We only want them to be able to edit the form for a half hour in one shot (they can save and continue to add more time).


I have one solution, but I wanted to see what other people have thought of.

In my solution, when a user first looks at the form (or any parts of the form because there are multiple parts that all need to be locked down) none of the fields are editable until they hit the edit button. Once they hit the edit button a flag is entered with their user id and the start time. Then they are redirected to the same form that is editable. There will be a javascript timer at the bottom of the page to let them know how much time they have left. When they are finished they hit the ‘Save and Exit’ button to save their changes, to unlock the form for other users, and to go back to the uneditable form. To avoid the use of the back button to return to the editable form I am thinking that an intermediary page that contains a javascript redirect will be used. So if they hit the back button they will be just redirected back to the current page.

If they want to edit one of the sub forms (there are buttons that redirect them to the sub forms from the main form) they can just click on one of those buttons in edit mode and it will save the big form, update the time to give them another half hour, and redirect them to an editable sub form.

When a user tries to look at a form that is currently being edited by another user, the edit button will be grayed out and the information of the current user will be shown along with the time it should be opened back up, but this time could be changed by the user upon saving and editing a sub form.


Does this sound like a viable solution? If had to do the same thing please let me know what your solution to the problem was?

  • 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. 2026-05-11T00:10:18+00:00Added an answer on May 11, 2026 at 12:10 am

    There are a number of ways to handle this situation. The one is by locking the form and allowing only one edit at a time. Another is to detect collisions when saving and warn the user.

    Locking is most useful on resources with high contention. If many collisions are expected then making the user click an edit button works best. This should flag the record as locked in your datastore and should only allow the one user to edit it. The record needs to be unlocked when the user saves the record, or when the user cancels. In a disconnected situation like on a webpage there should also be an auto unlock after a period of time.

    Collision detection is done by recording a revision number or last edited datetime and passing this to the client when they view the page. The client then passes this back to the server when they hit save and it is checked against the value in the database. If the value has changed then someone else has edited the record and the user can be warned of this. This system works much better for small edits, and when the resource is unlikely to be edited elsewhere (this is usally the case when there are many small records in comparison to the number of active users).

    I find detecting the collisions works better and is less frustrating for the user in web applications. Provided that the text they are entering is sufficiently small. This is because locking resources can hold on to them far longer than is neccesary, which is very frustrating

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

Sidebar

Ask A Question

Stats

  • Questions 216k
  • Answers 216k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer The property you are looking for is ItemsSource instead of… May 12, 2026 at 11:11 pm
  • Editorial Team
    Editorial Team added an answer Segregate your code: use the external libraries to the fullest… May 12, 2026 at 11:11 pm
  • Editorial Team
    Editorial Team added an answer Yes. You need to write code in C++ to start… May 12, 2026 at 11:11 pm

Related Questions

I have an ASP.Net web application that is deployed to a number of different
Following the KISS principle , I suddenly realised the following: In .NET, you can
My current architecture is based around my entities being simple containers for data with
I work at a company with a large SAP investment, and we also have

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.