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

Showing or hiding groups of three text fields

...
2
votes
2answers
283 views

Step-by-step form

I am creating a step-by-step form (it only shows in step-by-step and is not a multi state form) and the parts slide in and out (similar to GitHub but without the browser's back buttons). I have ...
2
votes
1answer
170 views

Duplicating Rails model for a form with meta-programming

Can someone please review my code: ...
2
votes
1answer
199 views

Function with jquery.alphanumeric

I want to implement jquery.alphanumeric in HTML pattern, so I used a jQuery plugin from here. Can this be shortened or improved? ...
2
votes
0answers
1k views

Multi-page form with each step loaded via Ajax

I've building a multi-step form that saves data in multiple models. The "base" or parent model is the Venue, and has_one or has_many other models. In the screen below, the "Basic Information" tab is ...
1
vote
0answers
70 views

Inserting non-empty form values into database

I have a form that I submit and returns me about 500 rows. Before inserting into table I check the strings are not null. This means it loops all the strings. Is there a better way that it doesn't ...
4
votes
1answer
1k views

Uploading multiple files for faculty nomination system

I created a few forms for faculty members to nominate colleagues for awards. Many of the nominations require documentation to be submitted in order to validate the nomination. I created one form then ...
0
votes
2answers
112 views

ListFind test conditions

I am considering ...
2
votes
1answer
99 views

Building options for input fields

In the _form partial I have a rather complicated logic which builds necessary options for input fields: ...
1
vote
0answers
555 views

Zend Framework Form Validation Example

I am a beginner in Zend Framework 3 and I want to hear your opinions about the code that I wrote. I don't know how exactly I can connect forms, and validators together that the code will be quite nice ...
5
votes
0answers
14k views

Spring MVC dynamically adding form elements

I made a simple form with an option of adding one text field dynamically on mouse click. And I will be grateful for suggestions on how I may improve the code. ...
3
votes
1answer
151 views

jQuery autocomplete for all place names in the UK

I made an autocomplete input box of every town, city and village in the UK. Yes, every single one. The load times are painful so is there a way to reduce that? Here is a sample: ...
-1
votes
1answer
95 views

jQuery button click handler to fill in form fields [closed]

I have this function and not quite sure how to optimize it? ...
5
votes
3answers
338 views

Upload an image to a folder through a form

I am using this code to upload an image. Please review it and give your feedback regarding performance, security, and quality. This also works in PDO project. ...
3
votes
0answers
72 views

jQuery plugin for a lightweight dropdown

I'm working on my first jQuery plugin for a lightweight dropdown. This dropdown behaves just like a ordinary <select>. Before implementing new features I'd ...
1
vote
3answers
888 views

Checking address fields for presence of a Post Office Box

I'm just trying to learn how to write jQuery better so I wanted some smart peoples opinions. The code is checking the billing and shipping address fields to see if it contains a PO Box address by ...
3
votes
2answers
70 views

jQuery Plugin for a Form

jQuery plugin for a form. Looking for constructive criticism on my code. Thanks in advance! ...
1
vote
0answers
199 views

JavaScript to add interactive functionality to a conference registration form

This is some simple JavaScript to add interactive functionality to a form. I'm trying to make it unobtrusive for non-JS users. ...
2
votes
1answer
341 views

Registration form validation in jQuery

I have created a registration form using jQuery. I am validating username and password using an AJAX request. The "submit" button is originally disabled and is only enabled when all three fields of ...
3
votes
1answer
53 views

Profile creation

I was creating a view with Django that would create a user profile for a website and this is what I came up with: ...
1
vote
1answer
210 views

Show/Hide button for a search field

I have made a form where the submit button will show if the text box is focused and the button will hide if the text box is blurred. These codes work fine. But I wonder if the jQuery code could be ...
3
votes
1answer
75 views

jQuery module to edit HTML elements

I need to turn a lot of html elements as editable elements. You will double click on the element to edit, press enter to validate (send a PUT to the RESTapi), press esc to undo. I've written this ...
2
votes
1answer
92 views

Build SQL query criteria from form input

I am using a <form> to send various input parameters as a GET to retrieve data from a very simple two table MySQL db. After filtering the inputs (resulting ...
3
votes
0answers
45 views

JavaScript validator plugin

Please help me to improve the JavaScript validator plugin by making it more OO and robust. Requirement is to trigger the validation if there is an attribute ...
2
votes
0answers
560 views

Check / uncheck multiple checkboxes on clicking a link in native JavaScript

I am trying to get to grips with native JavaScript and wean myself off jQuery, so as an exercise, I wrote the following to check or uncheck checkboxes depending on which link is clicked. Could this ...
7
votes
2answers
452 views

Github User Lookup

I have made my first app in Elm, a lookup of Github users. You type the name of the user into the search bar and the user's username and profile image - which has an anchor linked to their profile - ...
2
votes
0answers
67 views

Microsoft Office 365 Addin Angular Form

This is my first time making an Office 365 Addin and wanted advice on my current form structure. I'm particularly looking for advice on best partices for constructing directives and how to properly ...
1
vote
2answers
2k views

Use jQuery to force two checkboxes mirror each other's state

RESTRICTION: jQuery 1.6.4 only, no other library, or version can be used. My goal is to use jQuery to allow two input checkboxes behave the same. For example: If 1st checkbox is checked, 2nd will be ...
3
votes
1answer
211 views

Validate a form using jQuery

I am validating a form using jQuery. It is working perfectly, but I just feel the code is quite "bulky". There is a lot of if statements being used to achieve ...
1
vote
0answers
320 views

POJO-based PDF form filler

I'm pretty new to Java development and have written a little POJO to "PDF Form Filler" program. I'd be interested in recommendations and suggestions about coding style, used methods and classes and so ...
1
vote
0answers
44 views

AJAX Form Creator

I wrote an AJAX Form Creator (in the form of an js object constructor) that takes a form and a callback. I am a decent, slightly okay, completely novice developer, and could use feedback on coding ...
2
votes
1answer
68 views

Methods to check form validity and to count invalid form fields

I have two these methods. Their loops are pretty similar. I'd like to refactor it to avoid duplicate nested loops. How could I do that? ...
4
votes
1answer
174 views

Javascript contact form validation code

I'm a UI / UX Designer trying to sharpen my JS skills. I wanted someone else to check this code snippet and maybe have a Pro tip to improve or shorten it. Javascript: ...
1
vote
2answers
824 views

Simple JS validation for two contact forms

I'm not a pro in js so, my code is a mess (but it's working!). I would like to ask your help to reduce some redundancies in two cases. Those two are codes are affecting these two forms: ...
1
vote
1answer
199 views

jQuery handler for closing a login box

I'm sure there's a better more 'jQuery' like way of writing this. In particular the selector $(this).closest('div.login-box') being in there twice. Perhaps it's ...
4
votes
3answers
436 views

Adding a checkbox to a JavaScript class object

I'm working on adding checkbox functionality that controls adding new checkboxes to a div element as well a tracking checkbox behavior. My goal is to make this ...
1
vote
1answer
84 views

CSRF-prevention mechanism for a form

I am using codeigniter framework in PHP. In signup form I have: Controller: ...
3
votes
2answers
194 views

Form validation library

Background: After reading this thought provoking book I decided to write a small library as an exercise. ...
1
vote
1answer
980 views

Preventing XSS in a Symfony form to add a timetable entry

I have started to implement cross site scripting prevention (xss) within my code. However as I am using symfony for this particular project I have read up that nothing needs to be done for xss in ...
2
votes
4answers
3k views

PHP mysqli code for login form

Can you check my code if I wrote like a professional? connection page. form sign page. plan page. log out page. First I create the database and tables, then the connection file, then the form sign ...
1
vote
1answer
48 views

Sidebar menu to hide or expand parts of a form

I have some of my code that I have tried to improve on to make it cleaner and efficient and I would like some feedback to see if I am going in the right direction with what I am trying to do. I have ...
3
votes
4answers
68 views

Verifying that all form fields are filled in

I grabbed the form from some random site because I'm only interested writing the javascript at the moment. I am trying to check that a user has selected or entered text for all fields. I've made it a ...
2
votes
1answer
93 views

PHP store data from form into MySql DB

This is the first time I've tried this. I'd like some feedback on how I did, including any bad practice warnings. For example is it a really bad idea to allow the code to recreate the table if it ...
3
votes
1answer
2k views

simple form validation

i've just started to learn python /django .. im coming from php world ...i mostly struggle with None values which are new to me .. in php i mostly did my boll checking with true/false but in python ...
1
vote
4answers
112 views

JS form verification

I have three checboxes in my form. I have to check which one is checked and start the action. What do you think? Is this the easiest way of doing it? Checkbox 1 = cat Checkbox 2 = dog Checkbox 3 = ...
2
votes
3answers
4k views

PHP form validation for name, email, and Twitter handle

Given the following input values from a form, create a method or methods to validate the input based on their requirements. Throw an exception if any data is invalid. 1.1 ...
0
votes
3answers
39 views

Control of empty fields in a form via JavaScript [closed]

I would like to know if it is safe enough to create via JavaScript control of empty fields. Here is my example in detail: ...
4
votes
2answers
51 views

Window-size-dependent content toggler for an HTML form

I had to build a responsive component which allows the user to display specific content in a page. I called it the contentToggler. Here is my component in action ...
1
vote
1answer
4k views

Custom form validation using jQuery

Recently I have been doing a bit of work with Contact Form 7 and Wordpress. I've begun looking at form validation using ...
2
votes
0answers
192 views

Angular validation function for a user creation form

I have to make a user creation wizard, there are 3 steps to achieve the insertion of a new user, so every step I have have a validation function to enable the next step. As a first step for the ...