Questions tagged [form]

An HTML form is a section of a document containing normal content, markup, special elements called controls and labels on those controls.

Filter by
Sorted by
Tagged with
22 votes
6 answers
2k views

Login Form in HTML

I am a beginner and I have made Login Form in HTML. I'm pretty sure it will look horrible to any developer, but hey, that's why I've posted it. I'd like a general review of this. I'm especially ...
  • 321
15 votes
2 answers
1k views

Is this form submission validator professional?

I have written some jQuery code for AJAX form submission: ...
12 votes
1 answer
2k views

PHP form with bot deterrent

I saw somewhere on here that it helps reduce spam by adding a dummy input field that you hide with display: none, and like if it's filled out, then it's obviously a ...
  • 898
12 votes
1 answer
87k views

Submit an array as an HTML form value using JavaScript

I'm sending data from a form with a variable number of fields via an Ajax call. Some of the fields are grouped together so I have opted to send them as an array of JSON objects to keep the groupings, ...
  • 263
12 votes
1 answer
1k views

Small android app that gives a movie based on the chosen genre

Working on my first "big" project using the mighty Xamarin. Likewise my first venture in XAML so I suppose most focus will be going towards these new areas. Performance- and user-experience related ...
11 votes
3 answers
327 views

Conditionally set attributes in MongoDB based on form fields

I have code which gets data from a POST request (request.form dict), compares with corresponding attribute in object ...
11 votes
2 answers
2k views

jQuery AJAX form using bad practice

I have not worked with jQuery for years so my knowledge of it is extremely limited. I wrote the following form and received a comment elsewhere saying: This is some of the worst JavaScript I've ...
11 votes
2 answers
190 views

Early Access: Dynamically expanding input element table

This code is in a really early state in the lifecycle. I'm still in the process of implementing some core features, but nevertheless the code up to here works and accomplishes its task. I have no ...
  • 25.2k
10 votes
6 answers
2k views

Can people understand my form validation code?

I've just finished creating this form validation but I want to make it public for beginner 'contact us forms'. I was wondering if I can have some peoples' input on if they can understand/read my ...
  • 139
10 votes
2 answers
72k views

Reservation Form in HTML

I am a beginner and I have made a Reservation Form in HTML. I'm pretty sure it will look horrible to any developer out there, but hey, that's why I've posted it. I'd like a general review of this. I'...
user avatar
10 votes
2 answers
4k views

Checking all checkboxes

Problems: Wanting to check all checkboxes when the checkbox w/id=checkall is checked. Wanting to uncheck the "checkall" box when any other checkbox is unchecked. Solution: ...
  • 103
9 votes
5 answers
832 views

Prorated Refund Calculator (v2)

This is a follow-up question to original Prorated Refund Calculator. Here is the summary of the changes I made since last, thanks to the good answers and some study of my own. Did away with bleeding-...
  • 20.3k
9 votes
1 answer
1k views

Delphi XE 7 project template for saving / loading form settings

I have developed small test project as a template for production project. In this template I've found a way that the application saves and loads its own settings (ini-file). Main Form1 will contain ...
8 votes
5 answers
6k views

Selecting checkboxes based on URL parameters

Is there any way to reduce these lines of code? ...
  • 83
8 votes
2 answers
2k views

How much is 2 + 2?

I'm currently working on a kind of PHP Quiz about mathematical calculations. We show a mathematical equation, and user need to input his answer. Currently, this is what I have written: ...
8 votes
1 answer
9k views

PHP Form Builder Class

I would like my form generator class to be reviewed. I want to know about the following topics: Is this efficient? Does this have any flaws? Is this using the concepts in the proper way? Are there ...
8 votes
3 answers
26k views

Counting characters inside of a textarea using Angular

I have a textarea and need to calculate how many characters have been typed into it. Both of the following solutions work correctly—which would be preferable,...
8 votes
2 answers
7k views

Simple checkboxes with React

I was given the following exercise as part of a job interview process. I submitted my code and received the feedback that my solution is "close" but not "correct". My code executes just fine and ...
  • 83
8 votes
3 answers
2k views

Mask latitude text field

I have an input element on one of the pages. This input is supposed to take a string of digits from a user. In order to enhance UX I'd like to mask input's value at any given time. Like so: What came ...
  • 123
8 votes
1 answer
646 views

Populating many fields in a form using jQuery/AJAX

I have the following code which sets input values using jQuery/AJAX. Can the repetition of the code be shortened in anyway? It's mainly the AJAX requests I'd like shortened. It doesn't seem right to ...
8 votes
3 answers
2k views

Sanitizing and validating a user signup form before submission

The first part of the code (above the in-code comment in the middle) looks messy. I know I could use variables to make it cleaner, I just don't exactly know yet how can I effectively apply those when ...
  • 2,591
8 votes
2 answers
431 views

RGB <-> HSL converter + hue shifting

My input is basically a .png image from the img/ directory (I figured out that I should parse it, because there is an exploit ...
  • 81
8 votes
2 answers
228 views

How to DRY up my forms.py?

I have two ModelForms that are the same, except that one of them has its form layout built in a view and one has a submit button. These are pretty long and I have a ...
  • 375
7 votes
2 answers
3k views

Updating dimensions when focus is lost from any of 9 columns

How can I write this more pretty? ...
  • 181
7 votes
7 answers
2k views

Changing element visibility based on multiple checkbox states

I am writing a script in JavaScript & HTML and have some optimization problems. In the for, loop I check a variable named ...
  • 73
7 votes
2 answers
496 views

OOP PHP form builder with validation

Yes, another PHP form builder... I wrote this solely to demonstrate OOP principles. My questions are: Could this be written better? OOP-wise. How could I better implement error handling? Index.php <...
  • 73
7 votes
1 answer
9k views

HTML form using <table> or <div>

I read that, in HTML, it is better to display non-tabular data using the <div> tag instead of the <table> tag. I ...
7 votes
1 answer
93 views

HTML Date Selector

I made a date selector in HTML, which accounts for leap years and the number of days in each month. I am relatively new to javascript / HTML so please critique it as much as possible. ...
  • 183
7 votes
2 answers
482 views

Github User Lookup

I have made my first app in Elm, a lookup of Github users. You type the name of the user into the search bar and the user's username and profile image - which has an anchor linked to their profile - ...
  • 1,292
7 votes
1 answer
647 views

UI selector directives for an AngularJS invoicing module

I'm wrapping ui-select in my own directives to pre-configure and style it, as I need it for my app in different select widgets. They appear on many pages, for example ...
  • 225
7 votes
1 answer
2k views

Plugin that conditionally displays elements based on form values

I've just released a jQuery plugin that conditionally displays elements based on form values. I would appreciate any suggestions on how to improve both the code and its usefulness. Here's the demo ...
7 votes
1 answer
2k views

Developing a multistep form

I implemented a multistep form with the method described by Ryan Bates in ep217 but I had some weird behavior when refreshing or moving between the steps Acts_as_good_style (old but still good) has a ...
  • 785
7 votes
1 answer
12k views

Unit tests for React component to submit an input form with validation

I'm very new to front-end/unit testing and have been having a difficult time understanding the point altogether, but I managed to push my way through testing literally everything I could possibly ...
  • 171
7 votes
1 answer
3k views

React Native - Combining login and signup pages into one component

I have been building an app in React Native and have decided that since my Login and Signup components share much of the same ...
  • 315
7 votes
2 answers
619 views

Basic form validation

Question + Desired Outcome The code below works currently, however I'm not convinced the utilisation of an Array to iterate through numerous non-existent form ...
7 votes
1 answer
3k views

Get checkbox value of unchecked checkboxes in a table

I have a table where a user can (un)check checkboxes among other features in each row. I faced the problem that I don't receive unchecked checkboxes to my backend. This led to a bigger issue since ...
user avatar
7 votes
2 answers
81 views

Checking whether various form fields are filled in

This is a customer information data entry form. First name and Last name are required. In addition phone number, e-mail and birth date are used to check the database for existing customers with the ...
user avatar
6 votes
2 answers
297 views

Updating the presentation of a credit card field as the card type becomes known

The goal here is to, add a credit card image, and remove all other credit card images, of a certain input field. I had a even larger code, with a lot of addClass() and removeClass()... then, I shrink ...
  • 61
6 votes
3 answers
2k views

JS validation and submission with AJAX

I've got an assignment to do pure JS validation as well as submit with AJAX. Here is the code I've got so far. I'm wondering if I can do away with the whole "reason" bit. That was because it was ...
6 votes
1 answer
137 views

Account-Creation form

How can I optimize the following PHP/JS code? It works like a charm but I think it is too long and I'm sure it could be optimized. If I have another form, I'll need to copy paste some lines from my ...
6 votes
1 answer
529 views

Security of a "contact us" form

I have a form, which uses AJAX to send POST data to the following controller method: ...
  • 235
6 votes
2 answers
2k views

Cake-ordering form and calculator

I’m a designer learning to code and I’ve built a simple form calculator for ordering cakes. I would love it if you could show me how to make the code more idiomatic. How can it be more consistent, ...
  • 94
6 votes
1 answer
21k views

Spring MVC dynamically adding form elements

I made a simple form with an option of adding one text field dynamically on mouse click. And I will be grateful for suggestions on how I may improve the code. ...
  • 61
6 votes
1 answer
164 views

Form generator for inputting URL, description and link

This is a form generator I created so users can input a URL, description and link. The output will eventually be a JavaScript news slider. The HTML the form generated is irrelevant for now but I'd ...
6 votes
1 answer
304 views

jQuery plugIn to manage forms

I have just created my first jQuery plugin. I am looking to suggestions on how to improve it, leading to a code optimization. ...
6 votes
1 answer
107 views

Basic login system with 2 factor authentication

What I try to achieve I need to create a administration-panel for a website. Therefore, I need a possibility to protect the content of the panel via a password. The functionality doesn't have to be ...
user avatar
5 votes
4 answers
461 views

Calculate Final Grade: follow-up

I'm creating an online calculator to get the average grade of different tests my students take and also the final grade. I wonder if you see any problems in this update or any way to improve it: <...
  • 325
5 votes
3 answers
482 views

Upload an image to a folder through a form

I am using this code to upload an image. Please review it and give your feedback regarding performance, security, and quality. This also works in PDO project. ...
5 votes
4 answers
4k views

Counting thousands of selected checkboxes

This is a script I use to count how many items are selected in a form. It currently loops through the entire form to count how many check boxes are selected, each time a checkbox is clicked. The form ...
5 votes
2 answers
572 views

HTML 5 form validation and form handling

Problem Statement Create one form having following fields 1) Email ( with html5 email validation). 2) Password (It should take minimum 6 charactors ). 3) Your project URL ( with ...
  • 3,321

1
2 3 4 5
8