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
-4
votes
0answers
23 views

JSP Form send Wrong hidden Input Value to Servlet [closed]

I have an issue regarding sending hidden input value to the servlet. Here is my screenshots shown below. When I try to delete bookId 61, the form send a wrong value having book Id 43 in my screenshots....
3
votes
1answer
60 views

Basic input system for a few form fields

I am attempting to port a linear function that I designed in a spreadsheet into HTML and Javascript. It's based on linear least squares where I have to take a Matrix and multiply it by its ...
2
votes
2answers
4k views

Form for OTP entry with six single-character text fields

I am working on an app in which I have to pass 6 digits OTP through 6 textFields in which you to provide only one character and after that it automatically goes to ...
2
votes
0answers
26 views

Angular forms - reactive vs. [(ngModel)]

I am developing this angular app and it has big forms with 100 + fields. I was thinking about using [(ngModel)] without reactive forms, so that it's easier to do ...
6
votes
1answer
2k views

Get checkbox value of unchecked checkboxes in a table

I have a table where a user can (un)check checkboxes among other features in each row. I faced the problem that I don't receive unchecked checkboxes to my backend. This led to a bigger issue since ...
3
votes
4answers
406 views

Calculate inputs average

I'm creating an online calculator to get the average grade of different tests my students take. I wonder if you see any problems in the following code or any way to improve it: ...
1
vote
0answers
31 views

React Native form for entering one-time password [closed]

Here is the React Native code to optimize: it's an OTP form. I want it to be as small as possible. ...
5
votes
2answers
192 views

Calculator app in React

This is a simple calculator app that involves entering two numbers and allowing them to be editable and swappable. Calculations are done on the numbers, so the calculations should only be done when ...
2
votes
1answer
35 views

Date prompt React.js component

I have created a date component (working GIF at the bottom; please ignore the styling). There isn't a problem with the working of the code but rather the code I wrote seems messy and something hard ...
1
vote
1answer
7k views

onChange vs onKeyPress for input in React

I have an input form, and when you press enter I want it to call a function. I was wondering what "the right" way of doing this is. Right now I have an input looking like this: ...
0
votes
0answers
26 views

Using multiple dropdowns that have a single source of options

This code works as is but I'd like to learn if there's any way it could be simplified or cleaner looking. There are 3 dropdowns. Each dropdown's list of options are based on a single array of options....
0
votes
0answers
26 views

Process Extension for Oracle Agile Product Lifecycle Management to update product number field with value from the description field

We are digging into a performance issue with our Agile system. This Process Extension (PX) is used to update the product number field with whatever is in the description field. The product number ...
2
votes
1answer
94 views

Submit random choices on Google form

I've written a Python script that randomly selects radio buttons for each question, and submits the google form. My main questions for improvement are: Algorithm: I collect all the buttons into a 2D ...
4
votes
0answers
36 views

Form deserializer for Python Flask

I've started working on a small Flask project for no real reason other than fun, and pulled myself back on form validation. I realize that there are existing libraries like WTForms, but wanted to try ...
3
votes
1answer
421 views

Calling a Luhn check function when a credit card field changes

I feel like I should not be duplicating the code to gather the credit card number, but I am not sure how best to do it. Any suggestions? ...
2
votes
0answers
47 views

jQuery validation for multi-page registration form

I use JS/JQuery validation for radioboxes, input field etc. Because of AJAX I use one global validation (in a separate file) and 4-5 other files to coverage actions in a relevant registration form ...
2
votes
3answers
278 views

Using jQuery to set the class of an element corresponding to the selected radio button

I'm a bit of a newb with jQuery but can get it working to perform the functionality that I'm after. The below function checks the value of the radio input and then adds a class, depending on the ...
2
votes
1answer
46 views

PHP LDAP credentials validation and error handling

I developed this group of scripts to validate users againts a LDAP server and presenting the appropiate message to the user after sending the information. I wonder if I'm handling everything properly ...
4
votes
0answers
50 views

Vuejs - input validation

I'm in a project that's currently using vue. I'm at the moment developing validations for the inputs and in a way to make them more flexible, my idea was to create an intermediate component "Group ...
1
vote
0answers
42 views

Putting a multichoicefield under a dropdown button

I am building a web app in Django where one of the form fields is a multiplechoicefield from a many2many object that I use to select users that are allowed to edit the post. In standard form the field ...
4
votes
4answers
8k views

JS Function warning before closing browser

I have a function that makes sure the user wants to actually leave the page. I am not a jQuery expert. Is the code below the most efficient way to do this function? Or can it be simplified much more ...
5
votes
4answers
338 views

Calculate Final Grade: follow-up

I'm creating an online calculator to get the average grade of different tests my students take and also the final grade. I wonder if you see any problems in this update or any way to improve it: <...
3
votes
1answer
45 views

Note Tool - Fill text box with template

I've been working on a note tool for my company to help streamline verifying and noting accounts. I've added in extra features that help with different aspects of the job as well. I'm wondering if ...
4
votes
1answer
629 views

Simulate the way that PHP receives the form

Let's say I have this form: ...
1
vote
2answers
61 views

Secure a class for an hydratation from ma form POST

I use PHP classes for managing users accounts and I wonder if what I'm doing is correct. I directly use the $_POST['form'] for hydrate ...
9
votes
1answer
791 views

Delphi XE 7 project template for saving / loading form settings

I have developed small test project as a template for production project. In this template I've found a way that the application saves and loads its own settings (ini-file). Main Form1 will contain ...
2
votes
2answers
48 views

jQuery redirect form

I'm using jQuery to create a (hidden) form that redirects people to another page using JavaScript. ...
3
votes
3answers
2k views

Search form sample pattern

I've just started to practice coding in OOP and just wanted to ask if my code's pattern is correct. I need your comments or suggestions so I can improve it. sample_class.php: ...
5
votes
2answers
223 views

Address form validation

I need help with this code. How can I make it shorter? How can I create an array with the names, for example, errors, and modify code without so many If statements? ...
1
vote
1answer
104 views

Stripe payment form

I have a stripe payment form and when I use different forms that get hidden, I must use separate IDs for the form to appear. I have found a way to do this but looking to simplify the code if this is ...
2
votes
0answers
2k views

React hook “select all” checkbox implementation

This is a select-all checkbox (and checkboxes that it controls), that's usually found in tables/lists. Two things I'm concerned about: I'm returning elements from a React Hook - is that OK to do? As ...
1
vote
0answers
22 views

jQuery plugin for allowing only digits to be entered in html form input

I wrote this small jQuery plugin to set some fields so that they allow only 0-9 digits to be entered. I intended to do that by preventing user from typing, pasting or dropping non-digit content. It ...
2
votes
0answers
53 views

Textbox validation component

My intention is to have a component that serves as a textbox wrapper and able to set the error state, error message, and allow the parent to pass a function that sets its local error as I did not see ...
2
votes
1answer
66 views

HTML form with confirmation before submission

I'm creating a website about an auto show that the user is going to. I'm collecting input from them via textboxes, check boxes, radio buttons, etc. I'm presenting them with a confirmation that the ...
1
vote
1answer
143 views

Using a form with formsets in Django

I'm learning Django and making my (technically second) project. The project features several apps, including player_interface and manager_interface. Here's the player_interface/models.py: ...
7
votes
2answers
5k views

Simple checkboxes with React

I was given the following exercise as part of a job interview process. I submitted my code and received the feedback that my solution is "close" but not "correct". My code executes just fine and ...
0
votes
1answer
273 views

On form inputs focus, show div. hide div on blur for multiple inputs and hidden divs

I posted a question on Stack Overflow and got an answer that works but has a lot of duplicated code. In the future, the functionality may also require a third or more divs to be shown or hidden. The ...
1
vote
1answer
27 views

Processing form values for each day of week [closed]

I am using PHP, and I am getting the value back from the form. Since I am working with time, I have an array by (1 x 4) x 7, and I feel like I could do a better job at it. I just don't know exactly ...
4
votes
1answer
526 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 ...
1
vote
2answers
78 views

jQuery code to detect whether form fields have the default value when a checkbox is unchecked

How could I rewrite this jquery code to compact it in a more elegant form: ...
1
vote
1answer
11k views

PHP login form with PDO

I create login form with session with four files: connection.php login.php plan.php logout.php Please check my code and tell about any smokestack. Database educate (create table users) ...
3
votes
2answers
164 views

C# classes for adding form components dynamically

I'm currently reading on how to implement design patterns. I'm trying to implement the design patterns but need help on whether my understanding is correct. I have a windows form in C# project that ...
1
vote
1answer
646 views

Form validation for multiple inputs

I created an example of a simple form for multiple inputs (name and phone number) in React. If the user enters invalid data in input field, error text is displayed near the same field. I learned a lot ...
4
votes
1answer
26k views

Disable button when required inputs are not filled in

Currently I'm having a big form, with steps and a lot of complex fields. To make sure the user fills the required inputs and don't make them crazy pushing down the button submit when one required ...
1
vote
1answer
564 views

React multi-select-like component with filter

I am new to react (and javascript in general) but am enjoying learning it. I have decided to make a little multiselect component which should work as follows: I start with my data in one list, when ...
0
votes
1answer
499 views

Preparing form data for a POST request with fetch

Acquiring a form’s data for asynchronous POST requests has been a long-standing problem. There is the FormData API, but there are still some obstacles when the form’s data is encoded as ...
1
vote
1answer
81 views

Drop-down selectors for state and city

I have this old code and I want it to be easier to understand. Originally, it loaded using an onload on the opening body tag, so I managed to change that to a window.onload, but now redundant code is ...
7
votes
2answers
282 views

RGB <-> HSL converter + hue shifting

My input is basically a .png image from the img/ directory (I figured out that I should parse it, because there is an exploit ...
6
votes
1answer
7k views

Unit tests for React component to submit an input form with validation

I'm very new to front-end/unit testing and have been having a difficult time understanding the point altogether, but I managed to push my way through testing literally everything I could possibly ...
2
votes
1answer
61 views

User form validation using a POPO

I'm trying to sketch out a stripped down generic form validation example. I started by creating Plain Old PHP Objects (referred as POPOs) for form input with some classes such as a validator and html ...