form

Multiple Modes for a Form or Control in a .NET Application?

Are there any opinions on whether or not it is bad design to reuse a Form or Control in a WinForms .NET application by giving it multiple modes? I often find myself wanting to do this. I'll have some UI that needs to be used in multiple places and instead of reusing the code, I'll give the form a mode that determines things like what tex...

CSS Form styling with multiple controls on one line

I want to make a CSS form with multiple textbox/label combinations on a single line. Most examples I see show each line getting a separate form field. For example, I'd like Last Name and First Name textboxes on one line and Phone Number on a second line. ...

Why is my .htaccess www. force causing external forms to fail without www.?

Hello there, Because of strange cross domain AJAX problems, causing AJAX requests to fail when not using www.(the PHP handler communicating with the request is given in a relative path, so it can't be an address issue or something - that's what this question is about though), I have forced www. using .htaccess : #enable rewrite engine ...

Form Post Sends values via Request.QueryString instead of Request.Form

Here is an extract of HTML from within a standard HTML page: <form name="login_form" action="http://localhost/BOB.WebPortal/LoginForm.aspx" method="post> <div id="content_logins"> <div id="spacer_ie" style="width:990px; height:7px; border:none; float:left"></div> <div style="width:255px; height:22px; border:none; float...

Simple autosave for Spring MVC form

I have one page form done with Spring MVC. User has to register first and I would like the form to be saved automatically so user can come later to finalize it. Traditional form submission with a timer is not what I'm looking for. Instead, I am planning to use some ajaxy way to send fields to the server at each onFocus event. Any sugges...

C# Good way to close a form.

Say I want to open a new form.. TestForm test = new TestForm(); What is the good way to close it? More precisely, is only calling close() ok? Should I use the using() {} so dispose() is called ? And finally, suppose there is a dialog that should have only one instance of a dialog opened, is there a well "known" pattern? I've got di...

How should a non editable drop down box (combo box) be formatted in Winforms?

I'm using Visual Studio 2005 and drop down box has 3 drop down styles 'simple', 'dropdown' and 'dropdown list'. My drop down box doesn't allow the user to enter a value it contains a fixed number of selectable items. I've been setting the style to 'drop down list' as this doesn't allow editing but I noticed that Microsoft uses 'drop down...

wyswyg html form printing

I am starting this web app project (asp.net mvc) It's a document-based system, such that nearly each web page is a model of an official printed form (and users sometimes should be able to produce prints). I am wondering how much cost and time saving it will be if the form could be a wyswyg page that will serve both electronic and paper...

Is there a W3C valid way to disable autocomplete in a HTML form?

When using the xhtml1-transitional.dtd doctype, collecting a credit card number with the following HTML <input type="text" id="cardNumber" name="cardNumber" autocomplete='off'/> will flag a warning on the W3C validator: there is no attribute "autocomplete". Is there a W3C / standards way to disable browser auto-complete on sensi...

How do you overcome the html form nesting limitation

I know that xhtml doesn't support nested form tags and I have already read other answers here in stackoverflow regarding this subject, but I still haven't figured out an elegant solution to the problem. Some say you don't need it and that they can't think of a scenario were this would be needed. Well, personally I can't think of a sce...

AJAX Function to populate a field in a form?

Hey, I was looking through W3's tutorial on AJAX and I decided to make a javascript function that would populate a form field based on the response of a page. I took all their functions and tried to create the below one. Can anyone see why it wont work? function populateForm(myForm,formField,PageFrom,infoToSend) { var xmlHttp; try { ...

Edit form doesn't return selected value

I have a webform created in Rails that asks if someone has children or not? If I submit the form, it's able to get inserted into the db. When I edit the form, it doesn't show it ask selected. For example, the field is <%= f.select :have_children, [ ["Yes", 0"], ["No", 1] ] %> Whenever I select "No" and then edit the form again, it sho...

ASP.NET - Separate validation of two forms on one page?

Hi all, I have what should be a fairly simple ASP.NET question, and one I thought I had found a workaround for in the past, but this time I'm having no end of bother trying to get a working solution for it. I have an ASP.NET page with a number of input controls and a series of form validators for them. I wish the page to have separate...

Submitting HTML Forms with Slider as input (WebFX)

How can I submit the value of this slider to a CGI application (like you would a check box)? Not sure if the input tag for the slider is messing something up? <div class="slider" id="slider-1" tabIndex="1"> <input class="slider-input" id="slider-input-1" name="slider-input-1"/> </div> ...

Submit name value pair from javascript?

Can JS submit name/vale pairs through a document.testform.submit(); ? or does it have to be submitted through the html tags, for example <INPUT TYPE="text" NAME="inputbox1" VALUE="This is such a great form!" SIZE=50><P> ...

html value set from javascript?

<script type="text/javascript"> var p = s.getMaximum(); </script> <form action="/cgi-bin/Lib.exe" method="POST" name="checks" ID="Form1"> <INPUT TYPE="text" NAME="inputbox" VALUE="VAR P FROM JAVA SCRIPT HERE?" ID="Text1"><P></form> Possible to pass the javascript value 'p' as the value of input form? Thanks. ...

Django Override form

Another question on some forms Here is my model class TankJournal(models.Model): user = models.ForeignKey(User) tank = models.ForeignKey(TankProfile) ts = models.IntegerField(max_length=15) title = models.CharField(max_length=50) body = models.TextField() Here is my modelform class JournalForm(ModelForm): tan...

Why does my jquery form validation not work for IE7? It works in FF, Opera, Safari, etc.

Hi All! I recently used jquery and the form validation plugin on a form we're testing at our community college: www.mchenry.edu/parentorientation Right off the bat, (if viewed with FF, Opera, Safari, etc.) when you click submit w/o entering any values, you get some nice error messages in the form, the intended effect. However, if yo...

Totally Dynamic Form Creation: MVC or WebForms?

I'll start a new project, that will include forms whose inputs and their types (textbox, checkbox etc), Validation rules are defined in DB. I have to choose one of the frameworks for Form Creation, Form Validation, Edit/Insert Forms but I'm stuck. I doubt MVC will make handling Parent-Child relationship for Controls difficult. And altho...

jQuery Form Validation Plugin: Requiring e-mails to be .EDU addresses

I'm trying to build a sign-up form that will only accept .EDU e-mail addresses. I also want to keep the AJAX functionality I have (using the "remote" parameter) to ensure that the e-mail address hasn't been used before. How can I do this? ...