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
1 answer
68 views

Basic login form in React.js

I have made a very basic login/registration form in React.js. The inputted data is send to a Java Spring Boot Rest-API to create an user or to authenticate using JWT. But in this question I want to ...
O'Niel's user avatar
  • 197
3 votes
2 answers
651 views

PHP HTML form Class - so far so good?

I am writing this class to render HTML forms. It is working as expected, so far. There are many things to be done yet (including testing). Is it ok to keep this way? ...
julio's user avatar
  • 199
0 votes
1 answer
129 views

Generate HTML from input fields

I am building a small tool to generate a copy and paste HTML block, based on the user inputs. In the HTML file, I have all my inputs (select, checkbox, text inputs etc). I based myself on the JS of an ...
blogob's user avatar
  • 101
1 vote
0 answers
55 views

Three HTML dropdowns, where some options get disabled depending on earlier selections

I am making several dropdowns dependent on each other. Data used to form dropdowns: ...
Hello World's user avatar
4 votes
1 answer
447 views

Setting all hidden fields based on id

I am working on a web page where there is a checkbox with a value and a hidden field. I want to ask your opinion on whether this logic is sound. My logic The checkbox has a value that matches the id ...
Jefferson's user avatar
  • 361
3 votes
0 answers
295 views

Django form for product stock, where products from the same batch must be merged

Here is the context first. I have a 'Stock' table, in which I record all the stocks with as information: the product, the ...
Tobin's user avatar
  • 131
5 votes
1 answer
89 views

Secure password generator form

With the demise of passwordsgenerator.net I wrote my own generator; Please review with an eye on correctness and maintainability; ...
konijn's user avatar
  • 33.2k
7 votes
2 answers
928 views

OOP PHP form builder with validation

Yes, another PHP form builder... I wrote this solely to demonstrate OOP principles. My questions are: Could this be written better? OOP-wise. How could I better implement error handling? Index.php <...
PRobert's user avatar
  • 73
1 vote
0 answers
237 views

Multi-step form in React + Formik

I did a multi-step form. I only learn how to build applications, and would like you to check my code out, whether everything is done well, and so on. PropTypes checking was not implemented ...
Alex Kor's user avatar
0 votes
1 answer
143 views

Range slider show/hides and reset (vanilla js)

I have a HTML5 range slider. i.e. ...
Lieutenant Dan's user avatar
1 vote
2 answers
95 views

Having trouble deleting multiple queries (PHP, MYSQL)

I'm having trouble making WHERE IN query work, I was only able to make it work as a foreach loop. My payload looks like this: sku[]: BOOK0002 sku[]: BOOK0003 My ...
Metwesh's user avatar
  • 11
2 votes
0 answers
161 views

Accessible nested multiselect list

I'm trying to figure out the most accessible and semantic way to allow users to select one or more options from a hierarchical list. Think a taxonomy of categories and subcategories. I came across a ...
Sean's user avatar
  • 327
1 vote
0 answers
94 views

Flask API for converting Contact Form responses to Email notifications (with reCAPTCHAv2)

Introduction I wrote a proof-of-concept Flask server that accepts responses from a contact form and converts the data submitted to an email. I have added a rudimentary honeypot field that causes the ...
Hungry Blue Dev's user avatar
1 vote
1 answer
80 views

PHP function that clones HTML form structure to MySQL database structure

I built a function that should greatly simplify working with long HTML forms, that save data to MySQL using PHP. My forms usually have several hundred input elements that are added / altered / removed ...
John Doe's user avatar
  • 141
2 votes
1 answer
1k views

Bootstrap form with floating labels

I have turned a "classic" Bootstrap form into a "floating labels" form. For this purpose, I had to move the labels below the form controls. ...
Razvan Zamfir's user avatar
3 votes
1 answer
350 views

PHP Form with reCAPTCHA v2

I managed to make a very simple contact form. I used PHP for server-side validation and reCAPTCHA v2. You can access the form at the following link: https://test.dexsolutions.digital/index.php And ...
user avatar
3 votes
2 answers
735 views

Python Back-end registration validation

I'm working on a personal project (Flask CRUD app) and I am currently building the user service. I am trying to use as less as libraries as possible (that's why I do not use WTF-forms for example, ...
Pierre-Alexandre's user avatar
1 vote
1 answer
68 views

How can I upgrade my validation in JavaScript?

How to improve my validation in JavaScript? Namely I am wondering whether some parts of code can be shortened, improved, or removed althogether. I don't want to change the ES5 syntax because so far I ...
Piotr's user avatar
  • 11
6 votes
1 answer
133 views

Basic login system with 2 factor authentication

What I try to achieve I need to create a administration-panel for a website. Therefore, I need a possibility to protect the content of the panel via a password. The functionality doesn't have to be ...
user avatar
4 votes
1 answer
214 views

Displaying Media with HTML and JavaScript

I have a personal website that I use to share videos and images with friends. Below is a media generator using JavaScript and HTML. Its main purpose is to display one image at a time at the click of a ...
user avatar
3 votes
0 answers
226 views

Validating a file input whose value is reset to empty string ("") after selection

My form comprises of a mandatory file input. The form is validated according to the jQuery validate plugin. The file input has attribute required so that the ...
user51462's user avatar
  • 131
2 votes
2 answers
452 views

jQuery form.find radio class

In my application we have four inputs that are radio controls and the first radio control is checked by default. When the user selects another radio control and then saves the form I want to get the ...
Jefferson's user avatar
  • 361
2 votes
0 answers
58 views

Credit Card Form using RXjs

I am trying to improve my skills and I'd like to work on avoiding bad practices and mistakes. Can anyone skim over my code and point out what should have been implemented more efficiently or in a ...
Valary o's user avatar
  • 171
3 votes
0 answers
58 views

Reduce cluttering in a VPN initialization dance implementation (html, xml extraction and api calls) in Go

I'm still rather new to Go and I wanted to convert a part of a Python script I wrote a while ago to perform the VPN initialization dance (basically a set of API calls + parsing to fetch an auth cookie ...
Natalie Perret's user avatar
1 vote
0 answers
279 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. ...
droid's user avatar
  • 111
2 votes
0 answers
197 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 ...
pavithra rox's user avatar
5 votes
2 answers
714 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 ...
BrainFRZ's user avatar
  • 819
5 votes
0 answers
57 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 ...
user avatar
2 votes
0 answers
191 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 ...
mr_muscle's user avatar
  • 197
3 votes
1 answer
72 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 ...
pemby's user avatar
  • 141
2 votes
1 answer
62 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 ...
iRohitBhatia's user avatar
2 votes
1 answer
664 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 ...
Jh62's user avatar
  • 133
4 votes
0 answers
179 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 "...
martinho's user avatar
  • 161
1 vote
0 answers
650 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 ...
Bruno Vermeulen's user avatar
2 votes
1 answer
1k 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 ...
Linny's user avatar
  • 10.1k
1 vote
2 answers
83 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 ...
Zekkyo's user avatar
  • 11
2 votes
2 answers
240 views

jQuery redirect form

I'm using jQuery to create a (hidden) form that redirects people to another page using JavaScript. ...
Malekai's user avatar
  • 167
5 votes
4 answers
470 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: <...
Mori's user avatar
  • 95
3 votes
4 answers
2k 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: ...
Mori's user avatar
  • 95
3 votes
0 answers
6k 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 ...
laggingreflex's user avatar
1 vote
0 answers
36 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 ...
VBobCat's user avatar
  • 307
2 votes
1 answer
1k 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 ...
Linny's user avatar
  • 10.1k
2 votes
0 answers
69 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 ...
SCFi's user avatar
  • 163
1 vote
1 answer
706 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: ...
art-solopov's user avatar
0 votes
1 answer
3k 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 ...
user191294's user avatar
2 votes
1 answer
505 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 ...
uno's user avatar
  • 121
1 vote
1 answer
33 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 ...
IntFooBar's user avatar
  • 113
1 vote
2 answers
158 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: ...
user1286956's user avatar
4 votes
2 answers
332 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 ...
Ramji R's user avatar
  • 111
3 votes
1 answer
61 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 ...
Zach Wehrli's user avatar

1
2 3 4 5
8