forms

Localization of Django application only applies to forms.py and not to models.py

I have a problem when trying to localize my application. It is available in two languages: english and german. The problem appears when the browser has the language set english(United States) and in my settings file is set to 'de' and vice-versa. Some fields appear in english, others in german. My model contains CharField, DecimalField a...

JQuery clone <select> element

Hello, I want to clone a <select> input in HTML using JQuery. I'm not sure how to go about it, so thought I'd ask here. Particularly interested in the best way to write it back into the document as well. My select element looks like this: <select id="options"> <option value="1">Opt 1</option> <option value="2">Opt 2</option> ...

Handling Gridview Postback

I have a page that has a Gridview and a text input field on the page. The problem I am running into is that when the Gridview needs to page or the user selects to display more results the page does a postback and submits the input field for the form, which cause the validation (Using VAM) to return an error and block the Gridview from pa...

Rails, allowing users to create a form that will be used by other users.

Hey Guys, Hope someone can help me out. Currently working on a RoR project that needs a strange kind of functionality. Basically, I have two types of users named User and Researcher. Users can create forms and these forms are stored in the db and filled in by researchers. I have this basic schema create_table "form_fields", :force =...

JavaScript clear text box input not functioning properly

I know that this is an embarassingly easy question, but I can't figure out the problem, and that's why I'm asking the question, so please don't reiterate this point. Anyway, I'm just working on something here, and when I tested my page to see how things were going, I realized that my calculate() method isn't clearing text input like I w...

Nested form in rails 2.3 which updates one model but creates the other

So I have 2 models, listings, and houses. Houses can be made independently, while all listings must be associated with a house (this a an apartment-finding site). I am trying to build a form for a new listing which has a column alongside of houses already in the database. If the user sees their house, they click it, and the form auto-fil...

rails update redirecting to wrong controller

I have a model for a task which has a name, description, the process it belongs to, the position and a category. As there are only two different categories I have created additional controllers specific to the categories as they need to be treated differently. when i submit the edit form in one of the category controllers it is redirect...

EBAY: Custom Form Fields

Hi guys, I'm trying to create similar select boxes on my ebay product page. Any ideas would be greatfully apreciated! See caption below; http://markup.io/v/wnmqqc4e4a33 ...

Regular form post/redirect for submit button with Jquery submits for other inputs (validation)

I have a form where I'm using Jquery to submit the form to create a preview output on the right-hand side of my screen (I have some complex inputs and want to use ruby to process them to create the preview). After the user has completed the form and presses the submit button, I want the form to submit normally (i.e., as if Jquery is n...

Using the URL option in a form_for

I have a form with a url option. - form_for [@organization, @video], :url => organization_media_videos_with_session_path(@organization), :html => { :multipart => true } do |f| That URL is specifically a helper that I wrote here : def organization_media_videos_with_session_path(organization) session_key = ActionController::Base.sess...

ASP.NET MVC form submitted in FF/Chrome, not in IE

Hey guys, I'm going slightly insane here. I've been trying to figure out what is the problem for the past 24 hours, but I simply can't figure out what is wrong. I have an article submission framework. First the user inputs some article text fields, then he uploads 2 pictures, then he crops them. The problem occurs when I try to crop t...

On text changed in Javascript

Hi, i need to be able to able to detect when any character is entered into a textbox in Javascript, and clear another corresponding textbox. I have used the onfocus method for this but when tabbing between textboxes to get to submit, it removes the data and I don't want it to. What methods are there I can use to trigger a JS event when ...

Loading form in jquery dialog results in empty serialize()

Hi all, I'm creating a customer survey using a jQuery UI dialog. I'm loading an external html file (/survey/survey.htm) which has a form that contains two sections (#part1 and #part2). Each section is shown in the same dialog (#CustomerSurvey") $("#CustomerSurvey") .load("Survey/survey.htm #intro") .dialog({ title: "Cus...

form select object dynamically changing class name with php and javascript?

Having some trouble here with this. The setup: A select object with a choice of "Other" User selects "Other". Script runs when this specific value is chosen, and dynamically changes the class of input object from "hide" to "show" (hidden and visible with css display). <p>Select a Grade:</p> <select name="grade" id="grade" oncha...

Forms authentication on MVC always redirects to logon

I have forms authentication on my MVC site and the default route is set to send users to /home/index. Home/index is excluded from the login requirement, via a Web.config location section. if I type in http://Example/home/index, I go to the home page as expected, but if I just do http://Example, I get redirected to the logon page. If I t...

Single Sign on from Multipe Domains...

Hello, I have one domain such as http://www.mydomain.com and I have multple domains pointing to the same location in IIS by defining host headers, such as http://www.myONEdomain.com, http://www.myTWODomain.com, etc. In the code I use Request.Url.Host to determine which url the user came from and then I act differently in each page base...

Single quotes and addslashes in php forms (option value escaping on space?)

I cannot get my addslashes function and html option value to play nice together. My initial problem was the single quote in the option but by solving that I seem to have created another issue whereby $titleunit_name only comes through with the first word. This is what I want to come out: baroffice=O'Fallon & Highway K&N titleunit_na...

How do I capture user information when the PayPal button is clicked?

I have a form were a user enters information, and then I have a PayPal button that the user will click once the fields have been filled in. The problem I'm having is how to you capture the user information when the paypal button is clicked, if the form has action="http://paypl.com/something/something". Do I have to make this a 2 page pr...

How to prevent the Form from opening Multiple Times

I have a application in which i have several forms. In that forms, I have a System Settings form. I have to open this form from the menu as well as a shortcut created on the desktop. I am able to open the form from 2 places individually. But the problem is, It's opening two separate instance of the same form. it means, first, i have cl...

No response after submitting form on iPad from UIWebView

I am currently opening a webpage in UIWebView and submitting a form which performs a query on the server side and youtube video is returned (if available). I have no say/control over the server side implementation. This webview works fine on iPhone/iPod, however, when I try to run the same app on iPad there is no response after submitti...