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

1
vote
1answer
24 views

Best way to implement j_security login

I have a j_security login implemented but it's been giving me a lot of problems and wanted to know if there's anything that sticks out as incorrect or outright ...
3
votes
2answers
29 views

Initialise simple_form object inline

Using Rails 4 and a simple form, I'm rendering a couple of forms outside of their native controllers. Rather than scattering initialisers through my controllers, I wondered if it is cleaner to do the ...
2
votes
0answers
69 views

Simulate the way that php receive the form

Lets say I have this form ...
3
votes
1answer
46 views

Form validation evaluation to avoid exploits

Please advise if the form validation script below is secure enough to avoid most types (all types?) of contact form exploits? I ahve found this script online, added some extra php finctions in hope to ...
1
vote
1answer
22 views

Error-handling in Django model-adding form

I am writing a book database, and ultimately a library system, in Django. When a book is created without a title set, the ISBN will be used to automatically fetch book data from WorldCat I have just ...
2
votes
1answer
57 views

Create a state dropdown with an abbreviation option and a full option

I have this simple function here because I am too lazy to write out a state dropdown every time I need one. I already have an array with all the states set up, abbreviations as keys and names as ...
13
votes
2answers
1k views

Is this form submission validator professional?

I have written some jQuery code for AJAX form submission: ...
1
vote
1answer
36 views

Refactor Coffee Script to fire on page load instead of change

I have a Rails app where I'm trying to select a list of facilities based on what region is selected in a form. So far, I've implemented group_collection_select to do this as well as a bit of ...
2
votes
1answer
34 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
69 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
30 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
254 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
69 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
251 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
109 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
257 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
152 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
396 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
129 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
118 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
114 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
97 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
74 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
126 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
56 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
121 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
80 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
275 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
112 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
78 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
232 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
204 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
383 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
178 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
224 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
77 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
594 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
66 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
239 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
216 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
75 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
67 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
815 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
126 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
157 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
85 views

Is this a solid basic form validation script?

Is this a good form validation script? I'm using jQuery. ...