783 questions
0
votes
0
answers
52
views
IOS 17 camera capture not working in Next.js with <input type="file" capture>
Good day everyone,
I'm working on a Next.js project where I need to allow users to upload images using their device's camera. Here's the relevant snippet:
import { Loader2, Camera } from "lucide-...
0
votes
2
answers
392
views
React form validation for Zipcode when input type is number
I am working on a simple customer intake form, and as part of the validation I need to make sure that a proper zipcode has been included. I know regex would be the easiest way to solve this issue, but ...
1
vote
1
answer
85
views
How to Set Default Directory, Restrict Folder Access, and Enforce File Type Validation in <input type="file">?
I'm working on a file upload feature in an Angular project where users can upload specific files using an <input type="file"> element.
These are the html and css code snippets of the ...
1
vote
3
answers
291
views
How can I attach an addEventListener to an input field using the submit event?
I am making a simple tip calculator and first of all I am trying to save the value of the bill amount which the user can type into the input field (this input field has a type number attribute). There ...
0
votes
1
answer
40
views
How can I remove the default arrow from the list input and add a new arrow using pure html and css? [duplicate]
I want to remove the default arrow appearing in the list input field. is there anyone please who can help me and show me a way to add a new arrow in place of the default arrow here?
<body>
&...
2
votes
0
answers
153
views
Safari issues with input type=email and multiple attribute
In my experience, when viewing an HTML input field of type "email" with the "multiple" attribute present, Safari shows a blank input, whereas Chrome and FF show the field as ...
-1
votes
1
answer
85
views
Javascript: how do I get the value of an input in real time? [closed]
I am programming a web page and I have an input where the user must enter a 5-letter word and a button that will use said word for a function, I want the button to be disabled as long as 5 letters ...
-1
votes
2
answers
48
views
Unable to add decimal in input type even after adding step
I have HTML input which is set to be a numeric input including the up and down carets. To my surprise I am unable to enter any decimal numbers.
<input type="number" />
It does not ...
2
votes
2
answers
120
views
Alert box not displaying Sum with Html Input Fields
New to website programming. I'm trying to make a basic sum equation with 2 input fields taken from client-side.
<!DOCTYPE html>
<html>
<head>
</head>
<body&...
3
votes
0
answers
256
views
Android WebView translation missing in date and time picker for HTML input type date and time
When I use HTML input type time or date in an Android WebView, then the translation for set and clear is missing in the date and time picker.
In this example I'm using Dutch as language.
Sample ...
0
votes
1
answer
121
views
mwc-textfield input pattern not working for backslash or vertical bar
I am trying to add a pattern to a mwc-textfield input to filter a file name. My pattern seems to be valid js regex and seems to work on a html input but does not as a pattern on a mwc-textfield. I ...
0
votes
1
answer
169
views
How to force JS input's 'change' event when value was retyped but not changed?
I know there are a lot of similar questions, but I haven't found exactly my case.
Using vanilla JS there is an input control in which a user types something. A date as an example (but could be a phone ...
0
votes
0
answers
30
views
HTML/JavaScript: Execute form submit checks on button-press; is it possible in an elegant way? [duplicate]
I wrote an input form that has input elements with the required attribute set.
So when pressing an <input type="submit" /> button, empty fields (and other violations) are complained ...
0
votes
2
answers
302
views
Change the color of an element when text is typed in input?
I'm looking for a way to change the style of an element, (like the <body>) when not just text, but specific number like "5214" or something is entered in an <input>. With my ...
0
votes
1
answer
308
views
Prevent Duplicate File Uploads via Javascript
I'm trying to combine two concepts. This code works...
HTML
<input type="file" name="files" multiple>
<ul id="file_list">
<ul id="...
1
vote
1
answer
108
views
HTML input field width varies with content using only CSS (no JS)
I can set the width of an <input type=number> field with CSS width = 6em; or width = 100%, but those only set a fixed width or a width that varies with the container. I want the width to depend ...
1
vote
2
answers
758
views
What do input min and max actually do?
I was expecting min and max for <input> to limit the selectable options to the range in between the two values. They do in <input type="number">, for example. But with type="...
17
votes
2
answers
10k
views
Why is my regex valid with the RegExp u flag, but not with the v flag and does not work in HTML pattern attribute?
I am getting the below console warning for this regex pattern:
^[a-zA-Z0-9+_.-]+@[a-zA-Z0-9]+\\.[a-zA-Z0-9]+$
Pattern attribute value ^[a-zA-Z0-9+_.-]+@[a-zA-Z0-9]+\.[a-zA-Z0-9]+$ is valid with the ...
0
votes
2
answers
561
views
Visual bug when input is autofilled
I have an html form with a bunch of inputs. When an input gets autofilled by Safari and I then attempt to edit the input there is a weird overlapping of the string.
If I click around it seems to fix ...
2
votes
0
answers
132
views
Get partially filled HTMLInputElement date value
I've added support to my database for partial date strings, since YYYY-MM is a valid ISO date, however I've noticed that HTML's input element will always return an empty string if the day isn't ...
12
votes
6
answers
3k
views
How to create a scientific HTML slider with input type="range"
I need to create a scientific input slider. More precisely:
n ticks, example: no matter the range (0 - 200, 1 - 11, etc.), I want 11 ticks covering the whole range
the number value label below each ...
1
vote
2
answers
2k
views
The specified value does not conform to the required format, "yyyy-MM-dd"
I have implemented this solution to my school project
However I get this error from the console whenever I attempt to change the value of the initial date field
The specified value "2/21/2023&...
1
vote
0
answers
231
views
Websites don't detect filled in password?
I have been wondering (and checked the Bitwarden chrome extension source code but couldn't figure out): how do password managers fill in your passwords?
What I'm trying to say is: some websites ...
0
votes
0
answers
108
views
How to upload an image to django from an html input file
I am developing a web service on django with frontend on react. I ran into a problem that I can't upload an image to django. Below is my component code where I'm trying to download it:
export function ...
1
vote
1
answer
105
views
JavaScript hover event on a vendor specific pseudo-elements
I have the following html input tag.
$("input[type='range']::-webkit-slider-thumb").on('hover', function () {
//...
});
input[type="range"] {
height: 0.5rem;
box-shadow: 0 0 0.25rem ...