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
1
vote
1answer
165 views

Handling two buttons that submit a form using AJAX

I am currently handling forms by binding submit event and then calling the ajax() function: ...
2
votes
0answers
2k views

Using Symfony forms without a database entity

I've been developing an application based on Symfony 3, and part of that application involves an import process where a user can upload csv files. One thing that I've never been too sure about with ...
1
vote
1answer
67 views

Objects using jQuery to maintain a playlist of shows

This is my first attempt at using OOP JavaScript in my work. I know the concepts but implementation is more complicated than I thought. Now the code is a mixture of several things (JavaScript/jQuery). ...
7
votes
1answer
70 views

HTML Date Selector

I made a date selector in HTML, which accounts for leap years and the number of days in each month. I am relatively new to javascript / HTML so please critique it as much as possible. ...
7
votes
1answer
3k views

React Native - Combining login and signup pages into one component

I have been building an app in React Native and have decided that since my Login and Signup components share much of the same ...
3
votes
1answer
11k views

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 ...
5
votes
0answers
57 views

Building a form for rebooting many network devices

I have several IP based devices that, due to building maintenance, occasionally lose their communication with the other devices. Normally you'd have to find the device IP, go to its control page and ...
1
vote
2answers
127 views

PHP form simple validation

I'm quite new to php (learned and only used C# for web pages so far) and wanted to know if this is the correct approach for validating a form. This is my userform.php code: ...
6
votes
2answers
577 views

Basic form validation

Question + Desired Outcome The code below works currently, however I'm not convinced the utilisation of an Array to iterate through numerous non-existent form ...
2
votes
1answer
2k views

Basic PHP contact form using PHPMailer

I'm developing a PHP contact form script for my first site, using PHPMailer. I'm mainly concerned about security issues since I'm rather new to PHP. I've learnt a lot from reading several code reviews ...
8
votes
3answers
1k views

Mask latitude text field

I have an input element on one of the pages. This input is supposed to take a string of digits from a user. In order to enhance UX I'd like to mask input's value at any given time. Like so: What came ...
5
votes
1answer
286 views

Validation for a user form using jQuery

I have a really bad habit at the moment with writing global specific functions to handle data and feel like I could reduce my work load by stop copying the same. Basically I have a registration form ...
2
votes
1answer
83 views

Create a GUI to update parameters of an Object

I have an Glob object which represents a glob of data. It has several parameters like size, the date it was created, who created it, and so on. I'm building a GUI ...
1
vote
1answer
675 views

Filtering an array according to 7 checkboxes in a form

I am filtering an array whenever checkboxes are checked. ...
3
votes
3answers
158 views

Change text and styling of a form control when a slider value changes

Having a hard time to achieve what I'm looking for. I was thinking of using arrays but don't know where to start. Code below is what I want to shorten to get rid of multiple ...
0
votes
1answer
100 views

React components to render two kinds of form elements

I have two React components. The only difference is the input tag vs select tag. I'm trying to move the bulk of the duplicate code to a higher order component but I can't wrap my head around it. Any ...
4
votes
1answer
130 views

Handling two datepickers in a form with angularjs

Here's I am using simple form with angularjs. Everything works fine. I am having watchgroup for EndDateFrom & EndDateTo datepickers. When it's defined I am logging the value to console. I am ...
2
votes
2answers
114 views

Toggle the visibility of sections of a form

This code I written by myself. Here I have 3 main part. When I click on any main part then it sub part will appear. Sub part contain some check boxes. Here I have the following main functionality ...
3
votes
1answer
64 views

Triggering on form submit

In my HTML, I have a large form (id ="myform") that asks users to fill in 5 fields for Date of Birth (DOB), Sex, Weight, Hair Color and Eye Color and then several other fields which don't relate to ...
1
vote
6answers
401 views

Calling a FormatCurrency function on multiple textboses

I have a function called FormatCurrency() which I would like to call on each of the following elements: ...
1
vote
0answers
41 views

Simultaneous search with Google and Bing, remember the last engine

A proof of concept app to run the same query on both Google and Bing. For instance, if one of the engines takes too long on a slow connection or the results are not satisfactory, the same query can be ...
0
votes
1answer
34 views

JS OOP Form Module to add sibling select elements

How can it be more cross-browser compatible, robust, better performance if possible? ...
5
votes
2answers
227 views

Form that reveals more fields as each step has been completed

I'm new to JavaScript and jQuery and need input about how to optimize my script: ...
5
votes
1answer
2k views

Moving items between two multi-select lists

I am learning object oriented JavaScript and come up with below exercise. There are two multi-select lists, one is source and other is target. User can move the item from source to target and vice ...
1
vote
1answer
1k views

Approach to download files through POST request

I have a requirement to download multiple files using POST request. So I am using form submit to get this done. I have followed two approaches to accomplish this. Create a Form. Fill input details ...
0
votes
1answer
40 views

Feedback form security [closed]

I have written a form to collect some feedback, which is written to a CSV file upon an Ajax post. In my feedbackapi.php file I have sanitised, done checks and then written the feedback to a CSV file. ...
0
votes
3answers
3k views

Button to dynamically clone a form field

I am very new to javascript and started with a very basic add button to my django app. Everything I found was using jQuery but for only one small script jQuery seems to be a too big overhead for me. ...
0
votes
2answers
221 views

Handling missing elements on login form in Selenium

I try to improve my code so that I don't have to program a try - catch block all the time. e.g. at the moment I have to write many codeblocks like this: ...
1
vote
0answers
54 views

Generate user form fields based on a dictionary that may have nested dictionaries

This piece of code is doing what I need it to do but I'm still not happy with it. Here's the main logic to it: Iterating over a dictionary, I want to treat differently the one item that has the key '...
1
vote
2answers
122 views

Making a preselected drop-down selection box in HTML

I'm a PHP newbie and I have a question. Is there a better way to do this? A nice solution? ...
3
votes
0answers
364 views

React component with conditional form loading

I'm remaking an existing application into a single page application. I've created this component to take the place of multiple pages in the previous version. It shows a form with disabled data about ...
1
vote
1answer
89 views

Validation form JavaScript

I am a beginner to JavaScript and I know about jQuery Validations however I do not want to use a foundation like jQuery just yet. I am wondering if what I have done its good or if there is another ...
1
vote
0answers
2k views

Populate country-province-city dropdowns from Firebase query

I'm new to Firebase and am a recovering SQL developer, so I haven't quite wrapped my mind around all aspects of firebase querying. I have an app that has basic functionality in place, but some aspects ...
2
votes
1answer
609 views

Instantaneous validation of form field length

Since I have a function which can be done in few ways as usual, I was wondering which way is the best to achieve the form validation where I have only one input field, and I am showing a warning on ...
10
votes
2answers
48k 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. I'...
4
votes
1answer
709 views

JavaScript function to create HTML select option elements

I made this function to get rid of writing numerical option values in a HTML-select manually. From what I have seen so far it works as expected. But hints and suggestions are welcome anyway. <...
2
votes
0answers
194 views

IE8 Form Validation

I am writing a custom form validation script compatible with IE8+. I just wanted to make sure I am not messing anything up. I have tested on IE8 its works. However, I want to make sure I am doing it ...
1
vote
1answer
135 views

Working with a new form instance every time

I have a form that looks like this: It is initialized with a Shortcut from the keyboard. It is in a module: ...
7
votes
2answers
3k views

Updating dimensions when focus is lost from any of 9 columns

How can I write this more pretty? ...
1
vote
1answer
60 views

Enabling or disabling input fields

In my Rails app, I have a form. The form has radio buttons for entity type and has a text field for SSN and another for EIN. Based on the radio button selected, one of the text fields will be ...
2
votes
1answer
4k views

PHP Login and Registration system using BCrypt

I'm new to web development and this is my first website. I was wondering if my login and registration system is secure. I was also wondering how to handle viewing parts of a webpage when the user isn'...
0
votes
1answer
542 views

Resizing table widths and making input fields

I am trying to simplify my code, which will do several things: Give the same width to every columns no matter how many columns the table has. Add input field if there is no text inside a ...
9
votes
1answer
64k views

Submit an array as an 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, ...
2
votes
2answers
2k 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 ...
4
votes
1answer
85 views

Limiting the number of text fields created

It's a script that I've ripped off elsewhere, and have modified it via help from Stack Overflow on a couple of other questions, so that it tops out at 10 fields. My knowledge of JS/jQuery is barely ...
1
vote
0answers
438 views

Populating an HTML table with JSON results

Could anyone suggest a better approach than the one I'm using now? I tried to keep it as minimal as possible, but this is the best I came up with. I did extensive research just to get to this point. ...
3
votes
2answers
179 views

jQuery form data

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 ...
6
votes
1answer
2k views

Plugin that conditionally displays elements based on form values

I've just released a jQuery plugin that conditionally displays elements based on form values. I would appreciate any suggestions on how to improve both the code and its usefulness. Here's the demo ...
1
vote
1answer
139 views

Basic form validation script

Is this a good form validation script? ...
4
votes
1answer
499 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? ...