Skip to main content

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
6 votes
1 answer
544 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
5 votes
4 answers
470 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
  • 55
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
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
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
5 votes
2 answers
579 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 ...
overexchange's user avatar
  • 3,341
4 votes
2 answers
2k views

Is this contact form secure?

I have the following contact form, using PHP, JS and a bit of Ajax. I want to make sure that it is secure. ...
Leo's user avatar
  • 789
4 votes
1 answer
69 views

Style-changing handler for an HTML drop-down box

How can I maybe do some loop that will compress the amount of JavaScript/jQuery I need to use. I have a function s3episodesChange() linked to a ...
John123's user avatar
  • 205
4 votes
2 answers
3k views

phpMailer script for a contact form

I've just downloaded a script and would like to use it as a contact form on my site. The problem is I'm a front-end dev with little knowledge of securing PHP code. So, could you please have a look and ...
Dan's user avatar
  • 41
4 votes
3 answers
2k views

OOP PHP form ok?

I am new at OOP and I wonder if the code below is OOP or it can be better and also what can be better? ...
Bas DL's user avatar
  • 87
4 votes
1 answer
215 views

Displaying Media with HTML and JavaScript

I have a personal website that I use to share videos and images with friends. Below is a media generator using JavaScript and HTML. Its main purpose is to display one image at a time at the click of a ...
user avatar
4 votes
2 answers
3k views

POST security with PDO?

So I have some code that works as PDO. But is it secure? I'm trying to prevent SQL injection. This is my first PDO script and was hoping to see if it was done correctly. Here it is. ...
user2981256's user avatar
4 votes
2 answers
3k views

Checking login from associative array vulnerabilities

For a very simple databaseless website, I'm using an associative array to store logins like this: ...
user3287849's user avatar
3 votes
4 answers
2k views

Calculate inputs average

I'm creating an online calculator to get the average grade of different tests my students take. I wonder if you see any problems in the following code or any way to improve it: ...
Mori's user avatar
  • 55
3 votes
2 answers
676 views

PHP HTML form Class - so far so good?

I am writing this class to render HTML forms. It is working as expected, so far. There are many things to be done yet (including testing). Is it ok to keep this way? ...
julio's user avatar
  • 199
3 votes
1 answer
88 views

jQuery module to edit HTML elements

I need to turn a lot of html elements as editable elements. You will double click on the element to edit, press enter to validate (send a PUT to the RESTapi), press esc to undo. I've written this ...
user777466's user avatar
3 votes
2 answers
194 views

Use presets to change a form

I intend to populate some fields in a form based on some presets values. The user choose the presets from a list. The following code is working, but as I'm a newbie, I would like to know if I done it ...
n.h.'s user avatar
  • 239
3 votes
2 answers
2k views

Simplifying Counter of Checked Checkboxes

Is the following code a proper solution to my problem? I have a feeling it can be simplified quite a bit. If one of the first four checkboxes is checked the sum is 1; if two 1.5; if three 2; if ...
Tzar's user avatar
  • 94
2 votes
3 answers
6k views

PHP form validation for name, email, and Twitter handle

Given the following input values from a form, create a method or methods to validate the input based on their requirements. Throw an exception if any data is invalid. 1.1 ...
Unbreakable's user avatar
2 votes
4 answers
3k views

PHP mysqli code for login form

Can you check my code if I wrote like a professional? connection page. form sign page. plan page. log out page. First I create the database and tables, then the connection file, then the form sign ...
Mohamed Ahmed's user avatar
2 votes
1 answer
4k views

Purchase tickets calculation with JavaScript

I'm creating a page where users can purchase an adult, child or senior ticket, each with it's own pricing. Here's the code for review. Please let me know if there are ways to improve upon this code. ...
Eric Nguyen's user avatar
1 vote
1 answer
15k views

PHP login form with PDO

I create login form with session with four files: connection.php login.php plan.php logout.php Please check my code and tell about any smokestack. Database educate (create table users) ...
Mohamed Ahmed's user avatar
1 vote
1 answer
184 views

Working with a new form instance every time

I have a form that looks like this: It is initialized with a Shortcut from the keyboard. It is in a module: ...
Vityata's user avatar
  • 319
0 votes
3 answers
6k views

Button to dynamically clone a form field

I am very new to javascript and started with a very basic add button to my django app. Everything I found was using jQuery but for only one small script jQuery seems to be a too big overhead for me. ...
user avatar
0 votes
1 answer
239 views

React component wrappers for form fields with 90% similar code

I have a number of these components, but will show just two as an example. They're very similar, but the differences are enough to where splitting them out felt needed. What I really need is some help....
FranCarstens's user avatar
0 votes
2 answers
441 views

Submitting a form via JSON

I have a file named feedback.js that I would like to improve. ...
Kai Hendry's user avatar