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
0answers
37 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
51 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
20 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 ...
6
votes
1answer
77 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
36 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
381 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. ...
0
votes
0answers
30 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
87 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
72 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
136 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
118 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 ...
9
votes
1answer
237 views

PHP form review

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
134 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
134 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
52 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
193 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
56 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. ...
1
vote
0answers
98 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
167 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
71 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
57 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: ...
0
votes
1answer
54 views

Missing or introducing too many characters on mysql php post form [closed]

Please help me see what I'm missing, since I received an error at this row: "'" . $_POST['credit_card_expiration'] ."',".); I'm getting a headache of all the characters at the moment. ...
2
votes
1answer
290 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
114 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
1k 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") ...
0
votes
0answers
312 views

Rails chained scopes to build form filters

So I have a form in rails to filter the results. It is working right now but I find it ugly and I'm pretty sure there are better ways to do it. Here is what it looks like in my model, view and ...
1
vote
1answer
148 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
76 views

Is this a solid basic form validation script?

Is this a good form validation script? I'm using jQuery. ...
1
vote
2answers
500 views

Javascript form validation (zip code). Something better?

This is my first post. I have a javascript function that I intend use for validating zip codes and I wanted to know if my way could be made better. ...
3
votes
1answer
85 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 ...
1
vote
0answers
168 views

eDomForm - Dynamic Forms without Writing Any Javascript

I'd like some comments, and any suggestions for where to go next with this that you have. I've been working on developing a javascript library that allows for dynamic forms by simply adding some ...
2
votes
1answer
170 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
120 views

Copy object properties without using many if statements

I have two class: InputForm.java ...
2
votes
1answer
199 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
243 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 ...
2
votes
1answer
341 views

Add checkbox with label to a form

For a WordPress login form I have written a small plugin. It adds a checkbox with a unique name to the form and if that name is not present in the login POST request it just dies. The idea is ...
3
votes
2answers
112 views

jQuery form data code refinement

Could someone please help me make this code as professional as it can be? It works fine, but I feel there's a better way of doing this. I would really appreciate some guidance so I learn to code ...
1
vote
1answer
168 views

form validation php

i have a simple form validation script. Could you tell me how i can improve this script(mainly regarding security)? Html Page ...
2
votes
3answers
57 views

Flexible multiple string comparision to determine variable value

I've a web form that allows users to create clusters of three sizes: small, medium and large. The form is sending a string of small, medium or large to a message queue, were job dispatcher determines ...
2
votes
1answer
937 views

Database report in PHP

Just a small PHP exercise to write some simple reports, I thought I'd do it without a framework for fun and profit. I'm particularly concerned about the potential for SQL injection, since the user ...
1
vote
1answer
3k views

How to properly use OOP in PHP with forms

I am trying to wrap my head around how to properly use OOP in PHP when dealing with form submissions. The example below is a form for editing course information. I have a class called Course which ...
1
vote
3answers
424 views

Checking form input data on submit with pure PHP

I have some experience with PHP but I have never even try to do this wit pure PHP, but now a friend of mine asked me to help him with this task so I sat down and write some code. What I'm asking is ...
5
votes
3answers
941 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? ...
2
votes
2answers
389 views

Avatar creator form

I'm making an avatar creator with jQuery where users can select and change hair, eye and skin colour. The page is a form with different values and when the user clicks on the form options the values ...
3
votes
1answer
2k views

Is this a correct implementation of MVC pattern for form validation (php)?

Before going out and learning a full fledged framework I'm trying to understand the MVC pattern coding basic stuff, at the moment I'm testing with MVC applied to form validation. After reading a good ...
4
votes
1answer
314 views

Processing a form with PHP

I've seen few ways of processing forms with PHP. Whenever I am working with a form, I typically have two files: one for displaying the information (e.g. form.php) and the other for processing ...
1
vote
2answers
160 views

As professionals, is there anything clearly amateurishness about this code that I could improve?

This is just a simple login form with a very vanilla HTML mark up, but I just wanted to get some professional feedback. I know about jslint and try to adhere to there principals where possible. Any ...
1
vote
1answer
72 views

Is this a sensible form iteration pattern for a web form with an unknown number of fields?

I'm designing a small intranet-based time-tracking web app that accepts an unknown number of data "rows" which each consist of 7 form fields. Rows can by dynamically added by the browser. Can I do ...
3
votes
1answer
6k views

Dynamically adding rows to an accessible HTML form

Given the following HTML form (fragment): ...
5
votes
2answers
3k views

jQuery plugin $(node).toJSON() - convert html form to JS Object

GitHub project repo I've been working on this little function to convert an HTML form into a JSON Object having the same structure of the form. Basically it is intended to be useful in those ...