Category "forms"

Detecting where a submit event came from with jQuery

I need to detect how a user submitted a form to generate some statistics. They can either press enter when typing on the input or they could click the submit bu

View selected values of a form

I'm trying to view the value selected in a radio button. The form is: <form onsubmit="return false;"> <fieldset> <h3>Textos</h3> <la

Date input type validation in javascript?

I can't quite figure out how to validate a date input type in javascript. I tried looking on the internet but I just couldnt find anything. I have one field th

Validating email that has @something.co.uk

I have the following regex options: let emailValid = "/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/" emailValid = "^[A-Z0-9._%+

Why on IE 8 that a change event on input is not propagated to the form element?

I thought a change event would propagate from the input element to the form element in general? On Chrome, it works: http://jsfiddle.net/gjatW/13/ But on IE 8

HTML forms validation with a FILE input object

I've been pulling my hair out trying to add a FILE input object to a form on one of my intranet web pages. I saw this article (HTML <input type='file'> F

request.FILES always empty on file upload

I am totally stumped on this, and must be doing something incredibly stupid. I am trying to simply upload a file on a Django project. The problem seems to be th

Where to add onsubmit to a form in Javascript

In my HTML I've got a form without an onsubmit event listener: <form action="contact.php" method="post" id="contact"> ... <input type="submit"

Toggle between a textbox and a select using PHP

I have a basic customer information form that I would like to make a little more interactive. The idea being if the user selects a country that is not USA or C

Which Captcha or related is easy to is install on form?

I am a newbie to programming and I already struggled a lot for a week to have a fully functional form that validates, stores data, and then redirects. Please le

Stop a form after it has submitted

Just like the question asks, is there a way to stop a form after it has been submitted? This is not a 'how do I validate' question. I cannot call a function and

How to move the cursor in a DataGridView c#

How to move the cursor in a DataGridView? No. .Selected = true; as this puts the cell in blue by default! I want the cursor to move When I click on "Add" button

JavaScript this.form returns unexpected form

I got some enclosing form and two nested forms. the two nested forms are evaluated with ajax on buttonclick and the external form has a submit-button. Simplifie

Simplest way to disable button on submission of a form?

I've been trying to find the "right" way to prevent double submits of forms. There are lots of related posts on SO but none of them hit the spot for me. Two q

Prevent negative inputs in form input type="number"?

I want to restrict user input to positive numbers in an html form. I know you can set min="0", however it is possible to bypass this by manually entering a ne

Symfony-Twig: insert fontawesome icon in a form_widget

To validate a form I am using a standard: {{ form_widget(form.save, {'attr': {'class': 'btn btn-sm btn-danger'}, 'label': 'Submit form'}) }} I want to insert

JavaScript closure function not called on form submit

This has me perplexed. I have a textbox. You type something in, and press enter. JavaScript creates a read-only input element in separate form. Alongside the te

Validating Radio Buttons on Submit

I am trying to validate radio buttons on a competition, its multi-step so the radio buttons post the selection over to the entry form page. Currently having tr

How to make a real "onchange" event in HTML (no jQuery)?

Please note: I do not want to use jQuery for this (otherwise I like it) Problem: I have come to situation where I need to do some javascript function after an u

Django: Search form in Class Based ListView

I am trying to realize a Class Based ListView which displays a selection of a table set. If the site is requested the first time, the dataset should be displaye