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
2answers
52 views

jQuery range slider change text based on hidden field value

I am working on a jQuery ratings function that uses the Foundation range slider. My current implementation works correctly on 2 of 7 of my range sliders. However, I am quickly realising that my ...
2
votes
1answer
38 views

Submit an array as html form value using JavaScript

I'm sending data from a form with a variable number of fields via an ajax call. Some of the fields are grouped together so I have opted to send them as an array of JSON objects to keep the groupings ...
0
votes
1answer
106 views

Processing selected and deselected elements

I think that this code is very bad because it does not agree with DRY principle. Can you advise me how to improve it? ...
4
votes
1answer
55 views

Saving a form to a database

I have a windows form application which uses a form for two different purposes. We use the form for both our handheld system and our in-house system. I would just like someone to review the code for ...
4
votes
2answers
224 views

CheckChanged event readability

I have a CheckChanged method that I would like to improve as it takes a lot of space in my program and really hurts readability. The method prompts the user for ...
1
vote
1answer
38 views

Multiple form inputs droppable

I have a form with 11 inputs that relate to each column on a table, which is displayed above. Each input has an id that matches the a class in the table based on the column name. I want all the inputs ...
4
votes
1answer
36 views

Handler for a screencast submission form

I have a monolithic script that powers this form: Here it is: ...
1
vote
2answers
79 views

Making datastore inserts with Google App Engine and WTForms

I have a class for making datastore inserts with Google App Engine and WTForms. Now I want to refactor it into smaller units but I'm not sure how to do it. Can you help me find what needs to be done? ...
5
votes
1answer
326 views

Working with group of checkboxes in MS Excel

I have the following checkbox as depicted by the image below: The checkboxes are in 3 groups. Confidentiality, Integrity ad Availability. When the first in is clicked, the Confidentiality turns Red ...
5
votes
1answer
121 views

jQuery Datepicker Plugin

I created a jQuery plugin that converts a text field to a 3 drop down, datepicker. It allows the user to select a Day, Month and Year rather than type the date in an input box. The original input ...
1
vote
1answer
133 views

Meteor Form Submission

I am hoping a Meteor guru can please review my code below and verify if I am properly using return false and ...
3
votes
1answer
72 views

Form builder class

I am trying to learn OOP in PHP. My PHP knowledge is pretty good, but haven't tried OOP before. I'm currently building a formbuilder class. Can you take a look and tell me if this is the right way? ...
1
vote
1answer
29 views

PHP form to database fit for purpose

This code is intended to take input from a form and append it to a database table. The same data is sent to a separate function for subsequent mailing to the respondent. I'm self-taught and it works ...
1
vote
0answers
24 views

Form valid combinations from CSV selection options

I am building a form with multiple select option fields. I am trying to only show the next field if it exists as a combination in the CSV file I am reading in. It's working fine right now and I am ...
3
votes
2answers
113 views

PHP contact form

I recently had my site hacked, with the main index file being overwritten (nothing else was touched). I'm assuming they hijacked my form input. Are there any vulnerabilities in the code or does this ...
5
votes
1answer
124 views

Script to upload CV with cookie control

I have created a script which presents a popup on every 5th pageview. I would like to try to use just PHP cookies. However, due to the requirement of setting them before any content is output, it ...
2
votes
1answer
71 views

Getting duration between two dates

I'm developing on a web application where I have a start and a finish date and time and have to set the duration between it. There are inputs for dates and times. Then, I have this function which ...
2
votes
4answers
141 views

Returns an array of all inputs with specified name

I've made a nice little function to return a NodeList array containing all the inputs that have a specified name attribute: ...
3
votes
1answer
111 views

Checking checkboxes

I wrote this code for checking checkboxes. There are two groups of checkbox: each group's checkboxes have one common class all_perks and one individual class ...
3
votes
3answers
75 views

Validating conditions for enabling sign-up button

On an authentication view, there are some inputs, like password, email, etc and a sign up button which is enabled only if theses inputs are not empty. So what I have is this function: ...
2
votes
2answers
92 views
8
votes
2answers
2k views

How much is 2 + 2?

I'm currently working on a kind of PHP Quiz about mathematical calculations. We show a mathematical equation, and user need to input his answer. Currently, this is what I have written: ...
2
votes
0answers
99 views

HTML5/CSS live Validation w/jQuery

I've been working on a live form validation project, initially I intended on finding a way to solely use CSS for said validation but it quickly became apparent I would require some jQuery to get it to ...
0
votes
0answers
182 views

Using CasperJS to fetch and fill option values

I use the following CasperJS code to fetch data from an ASPX page with combo drop down box, which option values are dynamically populated via __doPostBack(). the ...
3
votes
1answer
173 views

HTML and CSS markup for flexible form layout

I'm trying to have a HTML / CSS structure for flexible layouts for forms. I tried to look at Bootstrap codes for help with this (without actually using Bootstrap itself). I've gone with something ...
10
votes
2answers
327 views

jQuery AJAX form using bad practice

I have not worked with jQuery for years so my knowledge of it is extremely limited. I wrote the following form and received a comment elsewhere saying: This is some of the worst JavaScript I've ...
7
votes
7answers
647 views

Changing element visibility based on multiple checkbox states

I am writing a script in JavaScript & HTML and have some optimization problems. In the for, loop I check a variable named ...
4
votes
2answers
56 views

Rendering a selection box for 50 states

I was creating a Rails form where users have to enter their state. I ended up creating a select tag which is really, really ugly. I'd like to think there's a better way of writing this. ...
2
votes
0answers
125 views

Immediately send redirect response, preserving session data

This question is for Laravel 4 only, as the relevant parts are completely refactored in the upcoming Laravel 5. I have written an helper function for validation, so I only have to put this in ...
1
vote
0answers
1k views

Parsing multipart/form-data in php for PUT requests

I have recently found that I needed to be able to parse multipart/form-data for PUT requests made to my REST API. This allows batch photo uploads, which has been a requested feature. As we all know, ...
3
votes
3answers
280 views

Triggering editing mode for a form

I think that my code isn't perfect and I need a help to understand how to optimize it. In my application I have a main form and several forms for data editing. The user can: Add a new item Edit ...
1
vote
1answer
406 views

Reusable library to alert user of potentially unsaved changes

I wrote a small reusable component based of some of the examples to this question on Stack Overflow about Activating OnBeforeUnload only when field values have ...
1
vote
1answer
62 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
60 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
188 views

Simulate the way that PHP receives the form

Let's say I have this form: ...
3
votes
1answer
104 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
94 views

Book database for a library system

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
162 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 ...
11
votes
1answer
555 views

Small android app that gives a movie based on the chosen genre

Working on my first "big" project using the mighty Xamarin. Likewise my first venture in XAML so I suppose most focus will be going towards these new areas. Performance- and user-experience related ...
14
votes
2answers
1k views

Is this form submission validator professional?

I have written some jQuery code for AJAX form submission: ...
1
vote
1answer
233 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
75 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
84 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
56 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
2k 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
87 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
971 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
444 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
454 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
477 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: ...