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 6051701
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:50:50+00:00 2026-05-23T07:50:50+00:00

I just found a bug where an HTML form element had a name like

  • 0

I just found a bug where an HTML form element had a name like “fantastic” and the action had an argument like “f*tasktic.” Since it was a checkbox, we were handling it being unchecked by coalescing to false (i.e., HTML forms submit no value for checkboxes that are unchecked, so we assumed null == unchecked.) Since the name was wrong, we always thought the element was unchecked.

This makes me realize that there are likely other places where we have problems like this.

Aside from writing exhaustive browser driven tests (such as with Selenium) are there any other good tricks for catching this type of error?

I am considering writing a test that looks in all of our spark views and asserts that for each argument in the action a form submits to, there is an HTML form element with the same name as the argument and vice versa. We have several “entire app” tests like this already, so it wouldn’t be totally out of place, but it feels kind of brute force and I was wondering if anyone has a better way to catch this kind of thing.

  • 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-05-23T07:50:50+00:00Added an answer on May 23, 2026 at 7:50 am

    I have a rule to always use ViewModels and EditorFor templates for to generate any form on the site. This stops this problem dead in its tracks.

    Brad Wilson has a great blog series on customizing the default template: http://bradwilson.typepad.com/blog/2009/10/aspnet-mvc-2-templates-part-4-custom-object-templates.html

    Just got put on a project where this isn’t the case and I’m taken aback by the barbaric way in which we hand write html forms. Icky!

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

Sidebar

Related Questions

I just found a bug in my Rails app which would lead to certain
I just found a bug in one of the rake tasks shipped with Rails.
Say I just found a bug involving javascript workflow in a web app. Most
Just found a bug in this code : for(String link : tempList1){ if(!tempList2.contains(link));{ listToPopulate.add(link);
I have found a very subtle bug in my R code just now. The
I just found a solution to one of the weirdest bug i have ever
I just found ... AGAIN ... a real time wastage bug as follows for
I just found a bug in some code I didn't write and I'm a
(No, this isn't a homework assignment, I just found the bug and thought it
I just found a nasty bug in my code because I captured a const

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.