form

Visual C#: Adjust Form Size

I've been trying to use a button to extend the size of my form. However, for some reason, it won't let me do this. I'd think this would be an easy thing to accomplish, but I get the error: "An object reference is required for the non-static field, method, or property 'System.Windows.Forms.Control.Width.get' The code I'm using that caus...

Django regex field - unique and without blank spaces

Hello, i have a ModelForm, in which i'm having a CharField, which is declared as unique in the Model. But I have 2 problems: 1.If i fill in the form with a field having the same name i don't get an error message 2.I'd like this field not to contain white spaces Is it possible to do that using a ModelForm? Thanks a lot! ...

use brackets in checkbox name when using php and javascript?

i have a form with checkboxes like this: <input type="checkbox" name="type[]" value="1" />Fast Food<br> <input type="checkbox" name="type[]" value="2" />Table Service<br> <input type="checkbox" name="type[]" value="3" />Cafeteria<br> when i use the brackets in the name (type[]), my php works: $type=$_POST['type']; ...

ASP.Net: Unexpected form execution flow

Hi, Have a look at this page: http://173.203.72.190:12123/Search-Results.aspx?Mode=Browse&amp;Cuisine=-1&amp;Zone=-1 If you click 'Browse' with the 'Any Cuisine', 'Any Zone' values, you will see results shown for all restaurants. If you put in a search string in the 'Search' box, you should see the results for that restaurant. Here's...

How to get the formatted POST data of a Django form?

I have a Django ModelForm but don't want the user to click on a reguar submit button. Instead, I made my own submit button and will post the form data using Ajax/jQuery. The data to post is a mix of the form data plus other information I gather on my UI. But... how do i get the formatted POST data the html form was supposed to submit? If...

Can you force an HTML form to use HTTPS for relative URLs?

I have a website in which every page is served via HTTPS. On one of the pages I have a form whose action attribute is set to a relative URL. The page with the form can only be accessed via HTTPS and the page the form posts to can only be hit via HTTPS, yet in IE I get a security warning telling me I'm about to switch to an insecure con...

Repopulating Select form fields in CodeIgniter

I want to re-populate (i.e refill) values posted from a select form field after validation. I know codeigniter user guide proposed using set_select() function but their example from the guide assume you've hard-coded (in HTML) the array of values for the 'select' form element. In my case I used the Form Helper and my select field values ...

Pagination techniques for search results from large forms

When creating search forms in web pages, I generally use the GET method. This allow the results to be URI Addressable. It also makes for easy pagination of results in the standard manner. But what about a form with a large number of options and fairly long field names? Using a GET request means that the URL of the results page can actua...

Django download file not working

I'm trying to make a script for downloading uploaded files, on the user's machine. The problem is that the download simply doesn't work (it either downloads me an empty file, or gives me some errors). the last error is: coercing to Unicode: need string or buffer, FieldFile found def download_course(request, id): course = Courses.ob...

JS form verification function not working

I have this form with a JS function to verify that there are no blank fields, but it doesn't work. <head> <script language='javascript'> function verifyForm(){ var msg=''; if(document.getElementById('field1').value==''){msg+='Field 1 \n';} if(document.getElementById('field2').value==''){msg+='Field 2 ...

prevent form submit from redirecting/refreshing using javascript

Hey everyone, I have a page where you can enter data within a series of texboxes (generated from php), and 2 buttons, GetData and SaveData. I want to be able to press enter when editing the texboxes, and it would perform the same action as clicking the SaveData button (onclick="onSave();"). I can acheive this by doing the following: <f...

Symfony: question about the form filters

In the frontend I have a page with a list and a form filter next to it that shows all the users of a social network. I would like to hide the user of the session in that list. How can I do it? My first thought is creating a function, addXXXXColumnQuery(), for each field of the form, and in each one add a line like this: ->andWhere("u....

Zend File Upload -- Access data in file

I'm building a site in Zend that requires the ability to upload a list of email addresses via a file upload. This will end up populating a distribution list table. What I'd like to do is have the user complete the form, including the attached file, then upon submit, I will parse the file and submit the form for each line of the file. ...

How to transform form tag code into a page that have a master page ?

I have asp.net web page that have the following : <form id="WebCaptureForm" name="WebCaptureForm" onsubmit="return checkform(this);" enctype="multipart/form-data" method=post action="http://site/page.aspx?idn=1&amp;tr=100d1165&amp;action=savenew"&gt; I want to make new page with master page that contain the same code but how ca...

Servlet POST parameters null

I want a servlet to print the parameters from a html form but in the servlet the request has no parameters. <form method="post" action="LoginServlet" > <input type="text" name="username" id="username" /><br/> <input type="text" name="password" /><br/> <input type="submit" /> </form> and the servlet's doPost(): protected v...

how to prevent form from sending some fields we don't want to send?

hi, i have form that have about 5 fields which final query created by processing values that fields. i want to send only final query not all fields to server. can i exclude some fields from submitting (with jquery)? <form action="abc/def.aspx" method="get"> <input type="text" name="field1" /> <input type="text" name="field2" /> ...

When Form UI is changed programmatically, event handler won't fire for sure?

I realized that on a webpage, when a form's UI (checkbox, dropdown list, etc) is changed programmatically, the event handler (onchanged) is not fired? Is this a standard rule -- that when a control is changed programmatically, the event handler will never get triggered? Is there any exception? ...

ASP form action file (FileSystemObject)

Hey, I've got my code to post a javascript array in a form: <form id="my_form" action="file:///C:/Users/John/Desktop/jquery/savetext.aspx" method="post" onsubmit="return prepare()"> <input type="text" id="file_name" name="file_name" rows="1" cols="20" /> <input type="hidden" name="seatsArray" /> <input type="submit" value="Save" /> </f...

HTML form input tag name element array with JavaScript

This is a two part question. Someone answered a similar question the other day (which also contained info about this type of array in PHP), but I cannot find it. 1.) First off, what is the correct terminology for an array created on the end of the name element of an input tag in a form? <form> <input name="p_id[]" value="0"/> ...

PHP checkbox problem

I am going nuts here, I have an array of checkboxes from a form that I am trying to $_POST with PHP. EVERYTHING on my form posts fine except the check boxes. The checkboxes DO post, but in the wrong order. For instance when I want checkbox[0] and checkbox[2] I actually get checkbox[0] and checkbox[1]. I have tried many different ways...