FAQ Database Discussion Community


Disable Required attribute from code behind

c#,html,required
I have two html input in one form, and I am setting them to required as follows: <input id="email" name="textfield36" type="text" class="input3" runat="server" required="required" /> <input id="frEmail" name="textfield36" type="text" class="input3" runat="server" required="required" /> I need to set the Required attribute to false to one of the two inputs from c#....

Changing required field in form based on condition in views (Django)

python,django,forms,required,multiplechoicefield
I have a form, LabelingForm() with two multiplechoicefields and I wish to set the required - parameter so that it is False when pressing button A and B but True when pressing button C. I 've tried with initial = False and required = True but it doesn't work, it...

wrong (Please fill out this field ) message in html

html,forms,required
I have several separated forms in my HTML page and each form has a several required inputs when I fill all inpus in the first form and I want to submit the first form the page alarm me Please fill out this field in second forms inpust, although I just...

How to disable submit button AFTER browser has validated fields with 'required' attribute?

jquery,html,validation,required
We are using the following jQuery to disable submit buttons in order to prevent double submissions (slow server!). jQuery(document).ready(function($){ /*SENDE BTN INAKTIV STELLEN*/ $("input[type=submit]").click(function() { $(this).css({'opacity':'0.5','cursor':'wait'}).attr('disabled','disabled'); }); }); However, how do we fire the script AFTER the browser has validated all fields with the 'required' attribute in our HTML form?...

Python: Opening a file with defined drive letter - TypeError: an integer is required

python,integer,typeerror,required
Here is my two lines of code: drive = 'j:' f = open("%s\sample", "wb", drive) I'm trying to write a simple program that is writing to a file that is being created by the program, the file is to be created on a defined drive, in this case, just onto...

Python TypeError: an integer is required while working with Sockets

python,sockets,integer,typeerror,required
Research: Getting a "TypeError: an integer is required" in my script https://github.com/faucamp/python-gsmmodem/issues/39 https://docs.python.org/2/howto/sockets.html Here is my complete error output: Traceback (most recent call last): File "/home/promitheas/Desktop/virus/socket1/socket1.py", line 20, in <module> createSocket() File "/home/promitheas/Desktop/virus/socket1/socket1.py", line 15, in createSocket ServerSock.bind((socket.gethostname(), servPort)) File "/usr/lib/python2.7/socket.py", line 224, in meth return...

Using required and readonly attributes together

html5,button,onclick,readonly,required
I'm creating an HTML5 web form. One of the inputs is for geolocation and it is filled by clicking on a button (it inserts gps coordinates). Since this input has to be required and has to be read-only (i do not want that users write custom data inside), how to...

required checkbox group

javascript,jquery,angularjs,checkbox,required
I'm trying to validate a group of checkboxes where at least one is required. This is the HTML of my checkboxes: <fieldset class="requiredcheckboxgroup"> <legend>How did you come into contact with VK?*</legend> <input ng-model="application.contact.relations" group-required required type="checkbox" name="appcontact" value="relations" id="app-contact-relations" />relations<br> <input ng-model="application.contact.employees" group-required required type="checkbox" name="appcontact" value="employees"...

IE8 'required' radio buttons

internet-explorer-8,required
I have huge problem, because my app must work properly on IE8. Could you tell me why required doesn't work on IE8? It works on Firefox. I have a lot of radio buttons and I need them to be required <tr> <td><input type='radio' name='check' value='0'></td> <td><input type='radio' name='check' value='1' required></td>...

error for displayed even it has not been submitted yet

php,error-handling,required
i just load the page yet the error has been displayed <?php $nameErr = $emailErr = $idErr = $passwordErr = ""; $name = $email = $id = $password = ""; if ($_SERVER["REQUEST_METHOD"] == "POST") { if (empty($_POST["name"])) { $nameErr = "Name is required"; } else { $name = test_input($_POST["name"]); //...

Batch file moves to location in argument

batch-file,arguments,required
Thanks to rojo the batch file below will check for illegal characters, replace them with a dash, search subdirectories and require a location argument, but when it's run it takes you to the directory you specify in the argument. I want to stay in drive/folder the batch file is run...

Form “required” attribute in form input field not causing anything to happen

html5,google-apps-script,html-form,required
I'm Andrew from Italy, I'm trying to adapt a script I've found on line. It's a script that creates an HTML form and uploads answers in a spreadsheet. This is the tutorial from wich I've started: GS CODE: var dropBoxId = "XXXXXXXXXXXXXXXX"; // Drive ID of 'dropbox' folder var logSheetId...

Which JavaScript, Grails and/or Grails framework produces these validation tooltip? (pictures included)

html5,forms,validation,required
I was asked to refactor an application and to change the texts of the tooltips that the (client-side) validation provides. I am, however, totally at loss at identifying which framework is being used (and people who've worked on this project previously aren't available for questions). What I found out so...

PHP form handler-using “required” instead “isset” when not filled

isset,required
Is it good to use "required" in input like this: Name:<input type="text" name="name" required> Or should I remove it and use "isset" in PHP? If I understand properly, both show you error, when you want to proceed next without filling input's, but required just awares you, while isset throw's you...