The Stack Overflow podcast is back! Listen to an interview with our new CEO.

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
2
votes
3answers
1k 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: ...
21
votes
6answers
2k 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 ...
2
votes
0answers
54 views

Function to prevent sign-in form from being spammed

I have written a function that I want to protect from spam bots. I have used two techniques the first being filter after submit. After reading around I obtained the ...
0
votes
1answer
48 views

Changing sales stage

I think this code is not optimized: ...
2
votes
1answer
50 views
1
vote
1answer
96 views

INSERTing a student info record based on form inputs

I want to improve my coding skills. How do I write this code with concatenation ...
2
votes
2answers
409 views

Keyboard handler for selecting radio buttons

I have got my JavaScript working as seen here: https://jsfiddle.net/yLg1qs04/3/ But how do I condense/shorten it so that it's not repeating itself so often and taking up so many lines? ...
1
vote
1answer
4k views

Created a frame with a disabled button, till check button is used, then return to starting state

I've been coding Python for little over 6 months now. I am self taught and I would like to ask for some help for myself and also for others in my position who's been wondering if they're going about ...
1
vote
2answers
727 views

Adding border to required fields when fields are empty

I want to add red borders to required fields, if the fields are empty. The ShowSelection() function is run when the interface is loaded, and everytime the interface is refreshed. I have the following ...
1
vote
2answers
73 views

Rendering drop-down boxes for country and region

In PHP how can I follow the DRY (don't repeat yourself) principle in this piece of code? The 2 classes in question share an awful lot of code. ...
5
votes
4answers
4k views

Counting thousands of selected checkboxes

This is a script I use to count how many items are selected in a form. It currently loops through the entire form to count how many check boxes are selected, each time a checkbox is clicked. The form ...
7
votes
2answers
73 views

Checking whether various form fields are filled in

This is a customer information data entry form. First name and Last name are required. In addition phone number, e-mail and birth date are used to check the database for existing customers with the ...
1
vote
1answer
76 views

Form submit and data display

This is my first PHP project - just to write to something to learn from. I made a page with form to send some quote to server and display some quotes from db. I'm just starting with PHP so point out ...
3
votes
2answers
306 views

Submitting an HTML form, adding submission to database and emailing the client and registrant

I have been asked to make a registration form that will add a users details to a database, create a registration code, then email the registrant and client the details including the registration code. ...
1
vote
2answers
138 views

Creating a percentage complete method for a form

I am a relatively new Rails developer and doctor doing research. In my Rails based research projects I often have questionnaires for which I provide a "% complete" parameter. Here is an example. You ...
4
votes
1answer
508 views

Restart Citrix session using locally stored application

I have a Windows forms application which we deployed in my firm for use on thin clients. The app lives locally on each user's machine, but pretty much all of the work the users do is over a Citrix ...
2
votes
1answer
477 views

Finding hidden field values in a web page before submitting a login form

In order to submit a login form using wget, I need to find the values for the hidden field that were added to the form recently. Grepping for the names gives the ...
4
votes
1answer
3k 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: ...
3
votes
1answer
289 views

Show one form that corresponds to the selected radio button

This piece of code I have written works, but I don't think its the best solution. What I am doing is check if a certain radio is checked if it is show this div if else show this div if this radio is ...
6
votes
1answer
130 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 ...
4
votes
5answers
237 views

Basic contact form

This is for commercial purposes. It's not going to a database, but will just be emailed to a person via phpMailer. I am not good at PHP (truly awful). I'd like to know whether this is good enough for ...
0
votes
3answers
145 views

Support for an interactive form with multiple tabs

I just failed in a JavaScript test and I would really appreciate some comments of how I can improve so I can keep learning. The test was about making a form interactive, where the code should do ...
2
votes
2answers
143 views

Placeholder text for HTML search field

I'm not a great JS coder so I need your expertises to look into my code (although nothing very special and it works fine) to see if it is good practise or not because I heard that dodgy JS coding ...
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 ...
8
votes
1answer
609 views

Populating many fields in a form using jQuery/AJAX

I have the following code which sets input values using jQuery/AJAX. Can the repetition of the code be shortened in anyway? It's mainly the AJAX requests I'd like shortened. It doesn't seem right to ...
3
votes
1answer
179 views

Basic login script for educational purposes

I have created a login script to demonstrate the usage of sessions in PHP. The focus is not on security, databases or encryption. The idea is to exemplify how you can use sessions to protect pages ...
4
votes
1answer
187 views

Forms - Ordered fields vs. dynamic iterations

I've made about 2 forms that have a server side action using PHP. For the first one, I made a variable for every form field and mapped it to $_POST["name"]. For ...
2
votes
1answer
160 views

Log in / sign up form

I'm getting into jQuery and I figured I'd start with log in / sign up form. (As an aside, I'm fully aware log in / sign up forms exist ad infinitum; this is more as a learning exercise than anything) ...
11
votes
2answers
179 views

Early Access: Dynamically expanding input element table

This code is in a really early state in the lifecycle. I'm still in the process of implementing some core features, but nevertheless the code up to here works and accomplishes its task. I have no ...
2
votes
3answers
374 views

Collecting form errors to be displayed

I have a piece of code that get errors from form and display to view: ...
4
votes
3answers
152 views

Synchronizing billing fields with the corresponding shipping fields

How can I refactor this redundant code? ...
2
votes
1answer
44 views

Handler for bidirectional unit conversion form

Building a form where values can be entered in either pounds or kilos. Script is... ...
1
vote
3answers
1k views
8
votes
3answers
1k views

Sanitizing and validating a user signup form before submission

The first part of the code (above the in-code comment in the middle) looks messy. I know I could use variables to make it cleaner, I just don't exactly know yet how can I effectively apply those when ...
3
votes
2answers
197 views

Expandable text boxes for legends of fieldsets

What is the best way to refactor the following script? ...
2
votes
2answers
367 views

Setting some element widths, disabling a button, and initializing some date fields

Does anyone have suggestions on how to refactor this? ...
6
votes
1answer
296 views

jQuery plugIn to manage forms

I have just created my first jQuery plugin. I am looking to suggestions on how to improve it, leading to a code optimization. ...
1
vote
1answer
1k views

PHP e-mail form with ReCAPTCHA

I want to ask if you can review the code for a simple contact form and the PHP code which sends me an email once a visitor fills the form and is validated through Recaptcha On my index.php file here ...
2
votes
2answers
4k views

Using actionPerformed() to call different methods per radio button selection

My Java is very rusty and I have been unlucky finding a better way to accomplish this task. I have two different methods which get called based on which radio button is selected. Is there a cleaner ...
1
vote
1answer
218 views

Identical jQuery autocomplete handlers for two form fields

I do need to use jquery autocomplete for two inputs. But I have use same processing script for these two elements. At this stage I am doing it like this. ...
4
votes
2answers
2k views

Designing a Backspace key

I have designed a Backspace button (part of a keyboard which I am designing) in windows forms and it works perfect with no errors (the code works very good). This button deletes what is inside the ...
3
votes
1answer
163 views

Submitting form after validations using jQuery

This is my simple jQuery form validation/submit logic and it is working perfectly fine. But still I am posting this to see if someone check the logic and suggest me if there is any other simple way to ...
0
votes
1answer
118 views

Configuring a date picker with support for disabled dates

I'd like to see if I can somehow make this loop more effective (smaller?). I'm using MultiDatesPicker to make a reservation plugin. And I've set everything right, and everything works, but I'd like to ...
4
votes
2answers
111 views

Extracting relevant form data to an array

I have the following function, it works exactly how I need it to; however I think there is room for improvement. The script is supposed to loop through all input and text area html elements. It ...
2
votes
1answer
170 views

Registration, Validation & Storage functions

The last time I wrote any serious code was the 90's, so a lot has changed and I am finding I am having to relearn pretty much everything. I have leaned a lot from previous posts and this is the ...
3
votes
1answer
4k views

Simply implementing a repeating HTML form with a total

Since the repetition mode didn't make to HTML5, I was wondering how to succinctly implement it in Javascript. I've already spent a few hours on this jsbin. Be great to get a review. ...
3
votes
2answers
95 views

Simple web form in PHP

This is a simple web form handler in PHP that sends a completely filled web form to a email. I see lots of repeating code. What is the best way to reduce repetition? Is my way of checking for fields ...
7
votes
1answer
627 views

UI selector directives for an AngularJS invoicing module

I'm wrapping ui-select in my own directives to pre-configure and style it, as I need it for my app in different select widgets. They appear on many pages, for example ...
4
votes
1answer
2k views

Phone number format and data entry restriction

I created a form that formats phone numbers, allows only allowable keys to be pressed, and converts a lettered entry into its corresponding phone keypad number. Is there some cleanup or better coding ...