forms

Add logic to a form when Javascript is disabled

I'd like my form to include a certain value if the quantity is equal to 1 (via a text box). I've managed to show what the total cost is using JavaScript and I could submit it with this value but I'm worried that when JavaScript is turned off the user will be able to submit the form without the extra fee being added. Therefor escaping th...

How to use jquery to populate a second select list based on a first selected option.

Hi, I am trying to dynamically change the options in a second select list using jquery depending on which item in the first select list is selected. The second select list also needs to have optgroups in it. How would I go about doing this? Thanks ...

Should tables be used to align form elements in HTML or is this looked down upon?

I like to follow standards and use table-less div based layouts. However using tables to align form fields/textareas and submit buttons is so much easier than using anything else. So is it acceptable from a strict standard perspective? I see google, facebook among others use tables in their registration pages. ...

need a little help with w3c and a form validation

I get this message with a w3c validator: line 112 column 30 - Fout: end tag for element "form" which is not open Does anyone know why I get this message? <form action="action.php" method="post" /> Uw naam:<br /> <input type="text" name="name" size="25" /><br /><br /> Uw e-mail adres:<br /> <input type="text" name="email" size="25...

How can I set the Name attribute of an input field using Jquery?

Hey guys, Quick question... I was wondering how I can get this to happen. Okay I have an input field like such: <input type="text" id="input1" size="10" name="" value="" class="checked other_amount" onfocus="Toggle('radio1', 'input1');" /> I would like to click on a div with an ID of #resetPrompt and fill the empty name attr from th...

IronPython WebbrowserControl - form creation issue

Hi, I'm using IronPython 2.6 and a WebbrowserControl on a form called TridentForm. This is used for displaying reports, etc. The main form, LaunchForm, has a button that has an OnClick event handler. This event handler sets some stuff up and then kicks off a BackgroundWorker. The Background worker completes, and in this callback it ins...

rails break pasted code into lines and display

Lets say I have a rails application in which code is pasted into the content text box like the following. Pasted Code Person name Person name Person name Person name It is put into the database with the proper new lines after each line according to my server log. What I want to do is in the show action I want to output this text a...

How can I override the django AuthenticationForm input css class?

I have a django site using the basic django registration framework. I have my login page working fine, but I want to change the css class on the inputs. The form passed to the login page looks to be an AuthenticationForm class. What would be a good way to add a css class to the username, and password fields? ...

jquery split textbox value into lines

What I am doing is creating a simple html page in which there is a textbox. A user posts some input to that textbox such as first last first last first last first last Imagine these are different names. What I would like to do is take the input in the textbox, and display it to the screen with the repeating names taken out, in alphabe...

Include part of form in jQueryUI dialog box

I have code that looks like the following: <form id="MyForm" name="MyForm" method="post" action="index.php"> <input type="text" id="Input1" name="Input1"> <input type="text" id="Input2" name="Input2"> <div id="dialog"> <input type="text" id="Input3" name="Input3"> <input type="text" id="Input4" name="Input4"> </div> <button type="but...

jquery - select all checkboxes with js array name

Hey, I want to use a JQuery "check all" function in a form like this: http://jetlogs.org/jquery/jquery_select_all.html My problem is I am generating my form from a php script, and I don't know exactly how many checkboxes I will have in advance. I use the "array" naming convention to be able to get all the selected checkbox values in m...

C# root form inheritance, changes cause broken child forms

Hi I've setup a few subforms all inheriting from a root form that sets up a few buttons and logos etc to then filter down to the children. I used the visual studio wizard to add the subforms inheriting from the root and they are automatically declared with: public partial class WelcomeForm : MynetInstaller.rootForm I've now been a...

DOB form input field

How can i create a form using 3 inputs for DOB 01/01/1982 but only having 1 field name in order to prepopulate a form. input 1 = MM input 2 = DD input 3= YYYY.......but the 3 combined only have on field name? ...

MS Access 2003 - Automatically show last records in list box on a form rather than first

So I have a form that has a listbox that shows like a ledger. My question is how can I make it display the last records (or have the scroll bar default to the bottom instead of the top), instead of the first few as the default. Now I don't mean reversing the order from bottom to top instead of top to bottom (though that would be a cool ...

IE8 won't submit form on ENTER in Windows 7 using https protocol, but will on Vista, XP, etc.

This is a weird one, and unfortunately I can't test it. At my company we are on Vista now and are not slated to get our Win 7 machines for another few weeks, but a client is complaining about it now. Basically, we have a form with username/password inputs and a submit button. Normal procedure is to enter your data and hit ENTER, bingo, ...

form echoes success without submittting anything to database. Is there something wrong with my flow control?

Here is the code. I really dont why it is not submitting my information. <?php //Includes mass includes containing all the files needed to execute the full script //Also shows homepage elements without customs include ("includes/mass.php"); //Grabbing data form POST array and storing in variables plus the date $username = ($_PO...

Double send of form when I refresh the page

How can I avoid to submit again the form when I hit refresh of the browser? Thank you. ...

Using CSS for a multiple-column form

any suggestions on the best way to do a form like that? http://i.imgur.com/vT7tC.png I'm using tables + input with width: 100%, I know it's probably not the best way (also, for some reason the input width: 100% gets bigger than [td] or [div] (the red border on this image is from a [div][input ...][/div]) thanks ...

Display value in Charfield for foreign key in django on error

Let's say I've got a model and it has a foreign key to another one. class ModelA(models.Model): field = models.CharField(max_length=100) class ModelB(models.Model): model_a = models.ForeignKey(ModelA) Than I've got this form: class FormB(models.ModelForm): model_a = forms.CharField(required=True) def clean(self): ...

form problem after sending (cookie problem)

Hi, I get a strange error after submitting a form the error is this one: Warning: Cannot modify header information - headers already sent by (output started at /var/www/g35003/coldcharlie.nl/subdomains/test/mailer.php:6) in /var/www/g35003 /coldcharlie.nl/subdomains/test/mailer.php on line 96 ...