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

learn more… | top users | synonyms

2
votes
1answer
26 views

Spree Billing/Shipping Address Checkbox

I used JS to re-populate the shipping address into the billing address when a checkbox is clicked. I'm wondering whether there is a more concise/better way to write the code below: ...
3
votes
1answer
64 views

RESTful workaround

I met the RESTful ideology and I fell in love with it. However the only request methods supported by HTML forms so far are GET and ...
2
votes
1answer
27 views

Form data handler class

I've started to write a form data handler class in PHP. Can you please review it and point out any mistakes or logic errors, or perhaps if a method can be written in a better way? ...
7
votes
1answer
138 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 ...
5
votes
1answer
66 views

List files and download

The following code list all files in a folder and allows the user to download one of them. It is working but I think it could be done better. Is there a way to reduce the number of forms to only one ...
2
votes
0answers
104 views

Ember.js file upload code

I am a newbie and tried to find the laziest way to do a file upload using EmberJS, jQuery and formdata (IE10+). The code might look stupid, but it worked. Can you please take a look and give some ...
3
votes
2answers
91 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. ...
3
votes
2answers
164 views

Form with a country list statically or dynamically generated

I want to create a form with a country drop down list so I can just google and get all the countries but the question should I just encode it statically or generate dynamically with PHP. (Note it ...
3
votes
1answer
97 views

Script for adding a set of form fields on clicking an Add More button

This is a script that I use to add a set of form fields on clicking an Add More button: ...
4
votes
1answer
285 views

Live updating headers from form input with React.JS

I am teaching myself React.js from Facebook with small projects. For this one, I want to know if this was the cleanest, most React-ish way I could have done this. The basic structure is as follows: ...
3
votes
2answers
122 views

Client-side validator for contact information form (name, phone, e-mail)

My recent post had some things to fix. I think this should be well structured and written for you. How does this code look to you? If something needs to be changed please tell me. ...
5
votes
2answers
108 views

Possible security issues in email validation

I need feedback on this code regarding security issues. ...
10
votes
6answers
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 ...
4
votes
1answer
92 views

Form Validation Evaluation

I've been trying several styles of validation code for a form. I was wondering if this is good or needs some improvement or just trash it and use jQuery validator code? ...
15
votes
6answers
1k 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 ...
3
votes
3answers
90 views

Password hashing/handling on a form

Does my code look secure right now? I know that I still have the password hashing and so forth, but what about SQL injections? Do I have any? Are there any other security issues? ...
1
vote
1answer
68 views

Optimized Form fields generating class

I am building an application full of forms and so I thought it is good idea to create a class to populate form fields. Here is my class and I am sure it can be optimized more than now and could be ...
4
votes
1answer
115 views

Security - Login system

For a school project I have been asked to create a login system for a website. The language I have to use is PHP with no database as of yet (for a later assignment). I'm just wondering if this code ...
1
vote
1answer
50 views

Eliminate nested HTML elements for jQuery animation?

Background When a user leaves a page, if they haven't submitted form data, a button is animated to draw the user's attention. (This is a poor UX choice--all the form data should be submitted--but it ...
7
votes
2answers
119 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 ...
5
votes
1answer
73 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 ...
9
votes
2answers
2k 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. ...
4
votes
2answers
240 views

Checking login from associative array vulnerabilities

For a very simple databaseless website, I'm using an associative array to store logins like this: ...
3
votes
1answer
106 views

Is this contact form code breaking any rules?

Can you please review my PHP script below? It is for a contact form. Am I breaking any rules? Does it seem okay to you? ...
6
votes
1answer
76 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
3answers
211 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 ...
5
votes
1answer
175 views

Validating HTML Form

I am trying to create a simple validation for forms. I am almost there, but there are few bugs and optimization errors that I am really struggling with. I'm looking for advice on how to make this ...
11
votes
1answer
341 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 ...
4
votes
2answers
169 views

Simplifying this form validation script - version 2

A week ago, I have asked how to simplify a form validation. From the answers, the code now is improved. Can anyone please share their opinion on the approach used below and advise me if there is a ...
5
votes
1answer
208 views

Security of a “contact us” form

I have a form, which uses AJAX to send POST data to the following controller method: ...
2
votes
1answer
73 views

A class for form data validation

I don't want any feedback on the regexes as I know what needs to be updated here. Also, don't need any feedback on naming conventions. I'm looking for feedback on the structure and correctness of ...
3
votes
2answers
432 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. ...
0
votes
1answer
64 views

What are the drawbacks of DRY input validation configuration?

I have designed the following input validation implementation with one goal: DRY. I'd like to know whether it is intuitive and what are the possible shortcomings. ...
2
votes
0answers
211 views

Django form validation based on the contents of uploaded files

I have a Django form with a lot of fields, including some FileFields. I want to validate the form based on the contents of the files: they must be valid gdal datasets, and if both are present (one of ...
3
votes
2answers
203 views

JavaScript form validation: improve on 'good, but not good enough'

I recently received a 'good, but not good enough' rating on a coding exercise I was asked to perform. It was to validate that if "Product complaint" option was selected that Product name, Product ...
0
votes
2answers
73 views

I have a form that involves several models related to each other - is there a cleaner way to write the form?

I have a form that I feel I am overcomplicating because of the relationship between models that are involved. Can you let me know if there's a more elegant solution to what I have? (for reference) ...
2
votes
1answer
65 views

How to refactor logic in the rails forms

In the _form partial I have a rather complicated logic which builds necessary options for input fields: ...
2
votes
1answer
628 views

Refactor jquery date split into day month year

I'm changing an html datepicker value (#date) into 3 separate values in order to post them to a booking engine. I've managed to get it to work but there is a lot of ...
1
vote
1answer
123 views

Is there a DRYer way to create this jquery quote generator?

This is one of my first real apps I've made with javascript(jQuery) so I know my approach probably isn't the best and my lengthy code shows. I created this simple app that spits out what customers can ...
1
vote
1answer
2k views

Multiple input fields from php table

To summarize from a previous question, the user selected a starting date, an ending date, and a region. From these choices, an array of weeks and regions are created, and users enter values ("points") ...
1
vote
1answer
155 views

Would like help on improving my jQuery Validation code

Would like some assistance in improving my jQuery validation code. I have some repeated code, but I am not sure how to write it in a way so that I don't have to keep repeating the same code over and ...
1
vote
1answer
83 views

Is this a solid basic form validation script?

Is this a good form validation script? I'm using jQuery. ...
4
votes
2answers
468 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
2answers
1k views

Form validation for zip codes

I have a function that I intend to use for validating zip codes and I wanted to know if my way could be made better. ...
3
votes
1answer
100 views

Javascript Form Manipulator Code Review

I'd appreciate a review of at least some of this javascript, if anyone has time. It's really long, but I think it's useful. It's designed to let you create forms and do javascripty things by only ...
3
votes
1answer
197 views

eDomForm - dynamic forms without writing any JavaScript

I'd like some comments and any suggestions that you have for where to go next with this. I've been working on developing a JavaScript library that allows for dynamic forms by simply adding some extra ...
2
votes
1answer
215 views

Is my form secure? PHP Security checks

I'm new to hand coding a PHP form/email submission. Are the security checks I've included here good enough? Or is this super vulnerable to attacks? My main concern is protecting the email login ...
3
votes
2answers
167 views

Copy object properties without using many if statements

I have two class: InputForm.java ...
2
votes
1answer
397 views

I made a PHP contact form that goes to multiple addresses based on drop down selection, how do I determine if my code is safe?

I followed a tutorial to create a PHP contact form that sends to multiple emails depending on drop down field selection. I have included the PHP below. Is it protected from spam/other dangers? Or is ...
3
votes
2answers
285 views

Wordpress php Contact Form - Security flaws

I have the following contact form included with my wordpress theme as a template. Now a user on Stackoverflow pointed out that this form has some serious security vulnerabilities. Could someone ...