forms

Display a pound / currency symbol in a Django select input

I have a number of currency values in a form select box (i.e. £2,500). When the form is rendered though it keeps the £ as is, is there any way to convert it to an actual pound sign? ...

Django access data passed to form

Hey, I have got a choiceField in my form, where I display filtered data. To filter the data I need two arguments. The first one is not a problem, because I can take it directly from an object, but the second one is dynamically generated. Here is some code: class GroupAdd(forms.Form): def __init__(self, *args, **kwargs): sel...

using < > in a ASP.NET MVC Form causing problems...

I have a problem that seems like there should be a simple solution but haven't found it yet. I have a pretty simple form that calls an action and passes it a FormCollection via HTTP Post. The form works perfectly until I introduce < or > into the field. Then I end up on a blank page having skipped the Action altogether. Need more inf...

how to validate credit cards using jquery.validation creditcard2?

Hello guys, I was hoping someone can point me in the right direction. I am looking to use this plugin along with jquery.validation plugin in my forms but from what I see I would need to use a select tag in order for creditcard2 to function correctly. What I currently have is this: <p class="ccType"> <label for="card_type" class=...

Simply trying to submit a simple form inside form, weird behavior

I have a ad banner that has a form and this is used by 3rd party site owners that grab this code and have this banner on there site. Since some sites that use this banner have a <form> wrapping there entire site i have found that the banners form doesn't submit it rather submits the outer form. Here is the code: <form onSubmit="retu...

Store form values for later submission

I have a Rails app that lets users create tutorials and quizzes. There are many users taking the quizzes and many quizzes in a tutorial. My client wants the quiz results to persist when a student navigates away from the quiz. So the use case would be: User starts to take quiz User answers some of the questions User navigates away from ...

I need to get form data from multiple forms on one page using $_POST

My project is a menu that displays daily specials at a cafe. The Pointy Haired Boss(PHB) needs to add/remove items from the menu on a daily basis, so I stored all dishes with MySQL, and created a page which will load all menu items as buttons. When clicked, the button will UPDATE the item, turning it on or off. I need form data to det...

change form action from aspx page to master page behind it

i have a master page and a child aspx page, coneected to each other. the master page has the form in it. Now the child page has checkboxes, whose value i would like to pass to another child page with same master page behind it. Can i change the action=abc.aspx and method=post? How can i send all the checkbox values (checkbox.text = abc@...

CSS Padding Issue w/ submit button

This is a dumb problem but I can't seem to set the padding on a submit button properly. No matter what I input for padding, the width and height of the button never changes. Here is the css: .green_submit { color: #fff; background-color: #94c909; border-right: 1px solid #6d9307; border-bottom: 1px solid #6d9307; border-left: none; bord...

How can I get jquery .val() AFTER keypress event?

I got: $(someTextInputField).keypress(function() { alert($(this).val()); }); Now the alert always returns the value BEFORE the keypress (e.g. the field is empty, I type 'a' and the alert gives me ''. Then I type 'b' and the alert gives me 'a'...). But I want the value AFTER the keypress - how can I do that? Background: I'd like to ...

django: How to make one form from multiple models containing foreignkeys

I am trying to make a form on one page that uses multiple models. The models reference each other. I am having trouble getting the form to validate because I cant figure out how to get the id of two of the models used in the form into the form to validate it. I used a hidden key in the template but I cant figure out how to make it work i...

Complex Forms in rails (has_and_belongs_to_many)

Hello all - Right now, I'm in the middle of actually building a Project Management application, and I'm kind-of stuck on the way i should build this form. At the moment of adding a project I would like to select the clients that would be included in the project. Here's the code to a few things of interest: Project Model Project Migrati...

Why image button dont work with forms in IExplorer 7+ ??? (Html)

Hello guys, i have a web form who send post variables like: <form action="teacher.php" method="post"> <input name="pass" type="password"> <input name="quiere" type="image" value="submit" src="IMG/unlock-32.png" /> </from> In the same page i check for a submit acction with php doing a simple isset check like: "if (isset($_POST['qu...

How can I add GET variables to the end of the current page url using a form with php?

I have some database information that is being shown on a page. I am using a pagination class that uses the $_GET['page'] variable in the url. When you click on a different pagination anchor tag, it changes $_GET['page'] to a new number in the url and shows the corresponding results. I have sort and search features which uses the $_GE...

Very strange form behaviour

I can't work this out. One minute it was working fine and now it's not and I can't see what's changed!! My problem is simply submitting a username and password for a login function. The form method is set to "post" but for some reason no data is getting through. If I dump $_REQUEST or $_POST they return empty. I know the form is submitti...

Form With Quantity doesn't seem to submit

Hey guys, I've been trying to understand the documentation and find an example, but I'm at a loss. This is just a submit form within the cart for updating the quantity. However, the updated quantity is not getting saved to the database -- it always makes the quantity 0. Please help. Form <% for line_item in @cart.line_items %> <% ...

Prevent controls from being redrawn in C#?

I have a form that contains a lot of runtime generated controls (image, button, panel,...), about 100 controls (I'm making a card matching game so there is a lot of controls in the form). I place the generating code into the constructor and each time the app starts, it took about 3-5s to load all the controls completely. If I bring an...

How can I display the results of a POST form in a prettyPhoto (or similar) light box?

I'd like to display a simple success or failure message in a lightbox on a website that I'm developing. The form submits to a PHP page that simply assembles some mail, sends it off, and then formats the appropriate message depending on the success or failure of the mail. I submit the form with a traditional <input type="submit"> button...

How to show a form on current screen in C#?

I want to show a new form in the same window from where it was invoked. I know a way to show this form on PrimaryScreen or Virtual Screen by code similar to as below: MyForm.Location = Screen.PrimaryScreen.Bounds.Location; But i want to show it on current screen. Is there a way to find out and show it on current screen? ...

c# mini-game: menu screen, how to achieve?

Hi, I am making simple graphical game in WinForms and currently I would like to have a menu displayed when the game starts. My only problem is that I am not sure regarding the structure of the application itself, this is what I have so far: 1) To have a Menu form and Game form. When New game is selected, create Game form and dock it to ...