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 ...
Freeze's user avatar
  • 321
15 votes
2 answers
1k views

Is this form submission validator professional?

I have written some jQuery code for AJAX form submission: ...
Sameer Sam's user avatar
13 votes
1 answer
91k 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, ...
Geraint's user avatar
  • 273
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 ...
CRABOLO's user avatar
  • 908
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 ...
Jeroen Vannevel's user avatar
11 votes
3 answers
330 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 ...
Mirzhan Irkegulov's user avatar
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 ...
Henrik Petterson's user avatar
11 votes
2 answers
194 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 ...
Vogel612's user avatar
  • 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 ...
Salata's user avatar
  • 139
10 votes
2 answers
75k 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: ...
Paul S's user avatar
  • 103
9 votes
5 answers
894 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-...
Phrancis's user avatar
  • 20.4k
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 ...
Gordon Freeman's user avatar
8 votes
5 answers
7k views

Selecting checkboxes based on URL parameters

Is there any way to reduce these lines of code? ...
Paul's user avatar
  • 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: ...
Jerem. Bartman.'s user avatar
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 ...
Abandoned Account's user avatar
8 votes
3 answers
27k 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,...
iv444's user avatar
  • 183
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 ...
Daisy's user avatar
  • 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 ...
askhat's user avatar
  • 123
8 votes
1 answer
648 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 ...
Michael LB's user avatar
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 ...
Kid Diamond's user avatar
  • 2,591
8 votes
2 answers
454 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 ...
xera518's user avatar
  • 81
8 votes
2 answers
229 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 ...
broinjc's user avatar
  • 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? ...
dadde's user avatar
  • 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 ...
AnhTuan's user avatar
  • 73
7 votes
2 answers
900 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 <...
PRobert's user avatar
  • 73
7 votes
1 answer
10k 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 ...
RedDragonWebDesign's user avatar
7 votes
1 answer
107 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. ...
Brian's user avatar
  • 183
7 votes
2 answers
492 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 - ...
alanbuchanan's user avatar
  • 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 ...
floriank's user avatar
  • 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 ...
natedavisolds's user avatar
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 ...
ecoologic's user avatar
  • 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 ...
j_quelly's user avatar
  • 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 ...
szier's user avatar
  • 315
7 votes
2 answers
623 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 ...
suitedupgeek's user avatar
7 votes
1 answer
4k 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
83 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
299 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 ...
mem's user avatar
  • 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 ...
justinae's user avatar
6 votes
1 answer
141 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 ...
Francois's user avatar
6 votes
1 answer
542 views

Security of a "contact us" form

I have a form, which uses AJAX to send POST data to the following controller method: ...
Onion's user avatar
  • 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, ...
Tzar's user avatar
  • 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. ...
Ivan T's user avatar
  • 61
6 votes
1 answer
172 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 ...
iliketolearn's user avatar
6 votes
1 answer
306 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. ...
Waqas Ali Khan's user avatar
6 votes
1 answer
126 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
11k views

JS Function warning before closing browser

I have a function that makes sure the user wants to actually leave the page. I am not a jQuery expert. Is the code below the most efficient way to do this function? Or can it be simplified much more ...
David Brierton's user avatar
5 votes
4 answers
468 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: <...
Mori's user avatar
  • 95
5 votes
3 answers
677 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. ...
USer345738380's user avatar
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 ...
jdstankosky's user avatar

1
2 3 4 5
8