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
1answer
475 views

Security of a “contact us” form

I have a form, which uses AJAX to send POST data to the following controller method: ...
5
votes
4answers
320 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: <...
6
votes
2answers
325 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, ...
5
votes
2answers
555 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 ...
6
votes
1answer
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 ...
4
votes
2answers
2k 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 ...
1
vote
1answer
132 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: ...
12
votes
1answer
1k 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 ...
3
votes
2answers
977 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 ...
2
votes
4answers
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 ...
1
vote
1answer
11k 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) ...
4
votes
2answers
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. ...
4
votes
2answers
2k views

Checking login from associative array vulnerabilities

For a very simple databaseless website, I'm using an associative array to store logins like this: ...
4
votes
2answers
2k 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. ...
4
votes
1answer
63 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 ...
4
votes
3answers
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? ...
3
votes
4answers
247 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: ...
3
votes
1answer
75 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 ...
3
votes
2answers
168 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 ...
2
votes
3answers
4k 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 ...
2
votes
1answer
623 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. ...
0
votes
2answers
313 views

Submitting a form via JSON

I have a file named feedback.js that I would like to improve. ...
0
votes
3answers
3k 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. ...