Questions tagged [forms]

A form is essentially a container that can be used to hold any amount of any subset of several types of data. HTML forms are used to pass data to a server. VB and C# forms are the windows used to interact with the user.

forms
35,944 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
21 votes
2 answers
3k views

Post form via ajax and get a form object in play framework java

I am using play framework 2.3.8 java and using ajax to submit a form but I am not able to get the Form object from that request.My problem is explained below. I have a Model @Entity public class ...
codegasmer's user avatar
  • 1,462
10 votes
0 answers
818 views

Displaying browser form error messages on blur

Most browsers have default error messages displayed when required form inputs are empty or invalid (Safari is the notable exception). I like the styling of these messages, so rather than create my own ...
Ollie Williams's user avatar
10 votes
0 answers
879 views

How to calculate the checksum in an XFA form

When you save an XFA form (XFA = XML Forms Architecture) using Adobe software, a checksum attribute is added to the form element. This checksum appears to be a SHA-1 digest, but it's unclear as to ...
Bruno Lowagie's user avatar
9 votes
1 answer
2k views

Rails 4 not using Remotipart to remotely submit form

It looks like Remotipart isn't actually being used to submit my form, so the image is completely left out when I look at the params where the form gets submitted to. remotipart_submitted? returns ...
Tom Prats's user avatar
  • 7,674
8 votes
0 answers
1k views

How to upload multiple files using react-hook-form with single file input field

Found examples of react-hook-form file upload. using 'multiple' is not working. How to upload multiple files using react-hook-form
Mohammed Aslam V P's user avatar
8 votes
0 answers
4k views

Is there any way to warn user when file changes all the time and can't be uploaded to the web?

When file keeps changing in the underlying filesystem of the user, Chrome (and possibly other browsers) are throwing nasty ERR_UPLOAD_FILE_CHANGED error for the user to wonder about. (on Chrome, ...
Roman Susi's user avatar
  • 4,165
8 votes
2 answers
15k views

Is there a way to return React Component as string instead of object?

I want to introduce a multilingual system. I have a function component that returns a translation of a specific element based on selected language (from Context API). Everything works well until I ...
Łukasz's user avatar
  • 123
8 votes
1 answer
8k views

Filtering a Form Array in Angular

I have a list which I transform into a FormArray to generate a list of buttons in html. I want to filter the cars by name CarComponent.html <input #searchBox id="search-box" (input)="...
TropicalViking's user avatar
8 votes
0 answers
535 views

Mailchimp - Signup Form - Using Tags

I've been using 'Groups' selection in my Mailchimp signup forms. But is it possible to use 'Tags' in the same way? I've got a MC signup form embedded on my site and wondering if I can replace the '...
Joe Bloggs's user avatar
  • 1,450
8 votes
0 answers
2k views

React - Dividing a Large Form into Multiple Components

I have a large form consisting of 30-40 fields. The form is logically and visually divided into parts. For example: "address details" "credit card details". I would like to divide it into multiple ...
Yisrael's user avatar
  • 113
8 votes
0 answers
1k views

Angular 5 | Check if a field exists in a Cloud Firestore

I'm currently working on a big project and for that, I need to work with Firebase and Angular 5, but I'm blocking a bit about form validation. I would like to create a custom validator to check if ...
DCMATE's user avatar
  • 125
8 votes
0 answers
3k views

Symfony preSubmit form event changes not retained in controller/persist

I'm having to make changes to collections (Symfony form CollectionType) to respect ordering and entity removal and I'm using a preSubmit event listener to make the changes as per this issue suggestion....
OK sure's user avatar
  • 2,637
8 votes
0 answers
4k views

File handling in Django's FormView - request.FILES is empty

I am trying to implement a FormView in Django, as it seems to cut down on a bit of boilerplate code. One of the fields is a file upload field. class LibraryUploadLastStageForm(forms.Form): ...
wobbily_col's user avatar
  • 11.7k
8 votes
2 answers
2k views

HTML5 input type of range and color can't be empty. What if the database column they are mirroring is null?

Among the relatively new HTML form controls are the 'type=range' and 'type=color' controls. The spec states that when a form containing such controls is submitted, there will always be a value ...
John's user avatar
  • 1,635
8 votes
1 answer
3k views

Tel input autofill drops international prefix

I have an input field of type "tel" with autocomplete enabled. <input type="tel" name="phone" autocomplete="tel" /> In Safari (both iOS and macOS), ...
buggy1985's user avatar
  • 929
8 votes
4 answers
8k views

How to detect Caps Lock state on page load (that is, not on keypress) with JavaScript?

So I've been researching solutions for Caps Lock detection for a form, using JavaScript/jQuery. There is a huge thread on stackoverflow offering many solutions. But the only problem is they don't ...
user avatar
7 votes
0 answers
1k views

Including a Microsoft Form inside a responsive page

Our marketing department built the following page and included an Microsoft Office 365 Forms (Kinda like Google Sheets) on the page: https://www.supertext.de/de/unternehmung/freelancerconvention ...
Remy's user avatar
  • 12.6k
7 votes
1 answer
364 views

SwiftUI: Animate Cells within a Form

I am trying to animate my Form or rather the cells within it. My problem is that the following code give me a nice insertion animation but for the removal the cell is suddenly removed after am ugly ...
l30c0d35's user avatar
  • 777
7 votes
0 answers
351 views

Is multiple root level directories upload possible with webkitdirectory?

We have recently developed a mass uploader that uses the webkitdirectory functionality in order to be able to upload directories and parse all inner files. However the uploading of multiple root ...
Chrysovalantis Koutsoumpos's user avatar
7 votes
1 answer
2k views

Using file-input with accept image to access webcam on laptop

This most probably is a duplicate, please point me in the right direction: I know how to use a file-upload input type=file with accept=image to allow fileupload of images from mobile devices. <...
Tobias Gassmann's user avatar
7 votes
1 answer
2k views

Automatic scrolled into view of focus input

How to enable automatic scroll to focus input when keyboard are open ? I create a simple demo where are 2 inputs: <div style="height:300px;"></div> <form action="/"> <input ...
Kholiavko's user avatar
  • 334
7 votes
1 answer
2k views

How do I populate a form array in Angular 2?

Suppose we have a form that can contain an array of values. For this case Angular provides us with FormArray class. this.form = new FormGroup({ addresses: new FormArray([]), }) Also we have an ...
Anton Telesh's user avatar
  • 3,602
7 votes
1 answer
288 views

Why doesn't Internet Explorer trigger the submit event consistently?

Found an apparent bug in Internet Explorer today, but unable to verify via research. Has anybody encountered this and/or can explain please? Synopsis Internet Explorer (at least 9 and 11) does not ...
nothingisnecessary's user avatar
7 votes
3 answers
3k views

How to override angulars type=number validation?

I am writing a directive that will validate the Swedish social security number (personnummer). To be used on an input element like this: <input type="text" ng-model="pnr" pnrvalidator /> The ...
Lars J's user avatar
  • 111
7 votes
1 answer
2k views

Symfony2 (>= 2.3): How to listen to parent form event from child?

I have a custom FormType, which needs to add itself to the parent Entity when the parent Form persists. In Symfony < 2.3 this could be done by doing the following: class FooType extends ...
Oskar's user avatar
  • 69
7 votes
1 answer
2k views

On mobile, how do I get "enter" to submit a form within a type="number" input?

I'm using AngularJS and ng-submit like this: <form ng-submit="submit(foo); foo='';"> <input type="number" ng-model="foo"> </form> In Chrome on a desktop machine, I can press ...
iffy's user avatar
  • 729
7 votes
2 answers
1k views

jquery file upload send all files in one post

I am using jquery file upload. I use it for several pages in a project. For one project I need to upload all the files in one request because I loop trough all the images and after that, a dossier is ...
user1664803's user avatar
7 votes
1 answer
2k views

Display upload percent through javascript just like bottom-left of chrome

Whenever you upload a file/files through chrome, it will display the upload percent in the bottom left corner of the page before hitting 100% and redirecting. Where does Chrome get this number and ...
Thomas's user avatar
  • 195
7 votes
1 answer
395 views

FORM scope always empty? URL scope is fine?

I'm running a legacy CF Fusebox 5.5 app within Railo 4.0.2.002 Express with Jetty 8 on Mac OS X 10.8 with java 1.7. I'm also using jetty urlrewrite http://tuckey.org/urlrewrite/ (if that's relevant) ...
Joshua F. Rountree's user avatar
7 votes
1 answer
2k views

Unable to cast object of type 'System.Data.SqlClient.SqlInternalConnectionTds' to type 'System.Data.SqlClient.SqlInternalConnectionSmi'

I keep getting the error mentioned in the title and I just can't seem get passed this. Here is my code: strSig = sigPlusNET1.GetKeyReceiptAscii() sigPlusNET1.LCDRefresh(1, 210, 3, 14, ...
Alex123's user avatar
  • 173
6 votes
0 answers
550 views

Safari 15 Desktop. How to set input field 'date' to empty default value

I'm currently working on a html form with input type="date" fields. Unfortunately Safari 15 sets current date as a default value in every empty date field. Is there a way to set the default ...
Uwe Kempf's user avatar
  • 121
6 votes
0 answers
3k views

React Hook Form - Cannot read properties of null (reading 'useRef')

I have following component: import { useRecoilValue } from 'recoil'; import styled from 'styled-components'; import { Basket } from '../../recoil/globalState'; import { EmptyBasket } from '../...
A curious student's user avatar
6 votes
1 answer
1k views

Angular Form is invalid for browser autofill

I am trying to disable a button based on the form valid state in angular. I am using Reactive forms with Validators.required. I am using this condition [disabled]=!form.valid. It works fine if the ...
amar's user avatar
  • 473
6 votes
1 answer
4k views

Validate nested component form item from parent form with Ant Design

Is there a way I can validate a nested component form item from its parent form when submitting? Here is an example, I know I could handle both items in the same form and this is not the best way to ...
Renato G. Nunes's user avatar
6 votes
0 answers
954 views

Force newline in django form validation error string

How do I force a Django form to display a newline at a specific point in the validation error string? I've tried using \n\n as well as a <br> in the validate functions in forms.py and neither ...
cjm's user avatar
  • 461
6 votes
1 answer
2k views

Which button type should be used for HTML dialog cancel buttons?

I am writing HTML dialog forms, with data-entry fields, where a "Cancel" button can be clicked to exit the modal dialog. Which one of the "submit", "reset", and "...
Monad's user avatar
  • 700
6 votes
0 answers
722 views

calendly.com integration into custom form (no iframe)

Has anyone used a calendly or similar booking service without an iframe embedded? So I need to have a custom html form and then, based on their rest api (if they have it at all) 1. Pre-populate day ...
nikola_wd's user avatar
  • 607
6 votes
2 answers
2k views

Passing received `.csv` file from Node js to some other server

I am trying to send a .csv file from node js to another server uploadCSVData = async( req: Request, res: Response, next: any ):Promise<any> =>{ const csvForm = new FormData();...
Samuel's user avatar
  • 1,276
6 votes
0 answers
2k views

Symfony: The temp file does not exist after sumbiting form

I am using Symfony 2.7 and I have a form that process excel file. When I try to intentionally create form error (or when I catch any error and create form error - I mean to show my error message in ...
Johny12369's user avatar
6 votes
0 answers
568 views

Angular 2 form (ViewChild) controls are empty in unit test

Template HTML: <form #myForm="ngForm" novalidate> <input #myCtrl required type="input" name="myCtrl" id="myCtrl" [(ngModel)]="value"> </form> ...
williamsandonz's user avatar
6 votes
0 answers
1k views

ionic3 - ios keyboard hide input field on focus until some input is given

Please find my below ionic info command cli packages: (/usr/local/lib/node_modules) @ionic/cli-utils : 1.9.2 ionic (Ionic CLI) : 3.9.2 global packages: Cordova CLI : 7.0.1 local packages: @...
Mohan Gopi's user avatar
  • 7,676
6 votes
1 answer
514 views

Safari blob download affects form submit - results in form post getting downloaded instead of opening in new tab

Download file option (using blob) is present along with another form submit option on a single page. The form result gets downloaded instead of opening in a new tab when download option is selected ...
Rishabh Rajgarhia's user avatar
6 votes
2 answers
796 views

How to fix the gap in between elements in the form?

The flexbox form has gap in between form items when there is radio button or checkbox. Is there any option to avoid the gap whether using flex or any other method? form { width: 100%; ...
Mo.'s user avatar
  • 26.9k
6 votes
2 answers
112 views

How to implement a form preview page in Zend Framework 2?

In my current ZF2 project I have a complex Form with multiple levels of nested Fieldsets, that reflect the structure of objects to be saved in the background. Currently the data is sent directly to ...
automatix's user avatar
  • 14.6k
6 votes
0 answers
1k views

AngularJS ng-disabled not working on submit with Chrome's autofill form

I am new to AngularJS, and I am trying to create a simple form. I have the Submit button to be disabled if the form is not valid (all fields not filled in). It is working fine, except on Chrome, when ...
Dev's user avatar
  • 149
6 votes
1 answer
277 views

Best practices / patterns for building a specific complex form

I'm building a form for users to be able to query mongoDB. A user must be able to add their own "entries" so to speak so that the following query would be possible: fieldA equals someValue AND ...
dsp_099's user avatar
  • 5,910
6 votes
1 answer
359 views

Form field changes focus when I click on the text input

I have a search form below that has two select input types and one text input field where the user can search by keywords. For some reason, whenever I click on keywords text box, the focus changes ...
JA4677's user avatar
  • 541
6 votes
0 answers
318 views

Disabling Autofill on <textarea> in Chrome

Has anyone found a way to achieve this? I've tried adding autocomplete="off" on both my <textarea> and my <form> but to no avail. Google Chrome continues to suggest addresses for me on one ...
user avatar
6 votes
0 answers
1k views

OwinContext.Request multi-part/form-data parsing?

Is there an easy way to parse multi-part/form-data information from an OwinContext.Request instance? I know how to do this using HttpContext.Current.Request.Form.Get(), but I'm not sure if I really ...
Xorcist's user avatar
  • 3,199
6 votes
1 answer
594 views

How to create an offline form for submitting WP posts

You may have seen WP plugins that allow guests to submit posts. Those submissions proceed to the WP posts area where the admin can edit/publish them. I want to create a form like this that I can ...
Justin Munce's user avatar

1
2 3 4 5
719