forms

Rails 3: undefined method `remote_form_for'

I have a fairly simple Rails remote form in HAML in a partial under shared/users: - remote_form_for :user, :url => { :controller => "users", :action => "create" } do |f| .field = f.label :name, t('name') = f.text_field :name .field = f.label :email, t('email') = f.text_field :email .actions = f.submit No matt...

Any disadvantages to using iframes

I've been advised to use an iframe to share a form between 2 websites, but I always got the impression that iframes are bad or that they shouldn't be used. Not sure I even remember what gave me this impression. So can someone clarify if using an iframe is bad practice or not, and if it is bad practice, why? ...

Creating an instance of a form in a BackgroundWorker

I want to create a new instance of a form in a BackgroundWorker. I've noticed that when I do this, the newly launched form freezes. Why does this form freeze? How can I get around this? ...

Nested Attributes not being saved

I have a form for creating/editing an event. There is a Client drop down which renders some custom questions and answers dependent on the selected Client. I'm running Rails 2.3.9 with Ruby 1.8.6 and Mongrel on Windows. Here is the relevant code: Event form - form_for @event do |f| .... = f.collection_select(:client_id, Client....

Problem with JSON Response from ASP.NET MVC in Some Browsers

I'm using jQuery's form plugin (as suggested in a number of threads like this one) to make an Ajax post to a .NET MVC controller and consume the JSON I get back. It works just fine in Chrome, but in some other browsers, including Firefox 3, the form submit results in a "Save or Open this file" dialog box. The JavaScript looks like: var ...

How to show an auto-incremental ID on a "create new record" form with Rails

I'm trying to create a form that will show the id that the record is going to have, prior to hitting submit on the form. For example, if I have a form to create a new project, and the previous project was id 3, I want the new project form to autopopulate with 4, so that I know that it's going to be 4 before I submit the form. Thanks for...

Using Jquery to dynamically create objects

I'm trying to dynamically create objects out of forms, but I want some reduntant elements to be ommitted, such as the submit. The only problem is that my function won't omit these fields. function form_to_json(formname) { var obj = new Object(); var identity = "#" + formname + " input"; // Create JSON strings ~~~~~~~~~...

Explicity exclude a html element from the tab order

Is there anyway to exclude an element from the tab order of a HTML form. So if i have the following <input type=text name=username> <input type=text name=password> <input type=button name=forgotpassword> <input type=submit name=login> I'm aware that I can use tabindex as 1,2,3,4 but i don't want to have to number all the fields. My a...

how can i get a next form/page while submitting a form??

i am working with a django quiz application where one question per page. when i will answer one question selecting a radio button and click submit button how can i get the next question in the next page as well as the answer will submitted to database. If anyone help me it would be an outstanding solution for me. please Thanks for the...

Min. Character Count Plugin for textarea like the one in this site?

Hi there, i am searching for a jQuery Plugin which should validate the textarea to the min. character with the count. like the one they are using in this site. any idea about the existing plugin? thank you ...

jQuery hit enter to submit the current form on page with multiple forms?

Hi, I have a page with multiple forms and was wondering if there was any examples showing how to submit the current form you filled in when hitting enter? Thanks ...

Jquery Ajax Form Submission

Hi, I am trying to make a Ajax form Submission in Jquery. The form itself is loaded via an Ajax Event The Form Element looks like this <form id="create_user form" action="http://127.0.0.1/create_user" method="post"> <p>Name <input type="text" name="name" value="" id="name"></p> <p>Employee Number:<br> <input type="text" name="...

Help with Form Validation

I want to validate a form. How do I do that? I have email,username,password as my fields. I don't want any of them to be NULL and password and confirm password should match. Please help me out. Thanks. ...

preventDefault not working in IE

Hi, I am trying to submit a form with ajax, the form itself is loaded via a ajax event The following Jquery code works in FF?chrome. In IE, the form submission is not prevented $("#admin_main").delegate("#create_user_form", "submit", function (event) { if (event.preventDefault) { event.preventDefault(); } else { ...

symfony : how to get rid of ugly GET parameters

Hello, i'm using form filtering to filter data in the frontend. The problem is that the URL is ugly http://............./players/game/?st_player_cv_filters[location_id]=1&amp;st_player_cv_filters[plateforme_id]=3&amp;st_player_cv_filters[level_id]=3&amp;st_player_cv_filters[_csrf_token]=023c5c9fb5fc7e7b6ed60d6839c36f67 (form rende...

reCaptcha Not working in PHP

(There is no problem with the code below, it was because i had a custom google.com dns record on my server for testing and reCaptcha uses google servers) I have been trying to implement reCaptcha for ages now, i have tried many of the different tutorials but none of them work for me, what is below is from the guides on their own websi...

jquery append form inputs?

i have this jquery script that is meant to append input boxes, its wont happen, i dont know why? jquery: $(document).ready(function() { $(".login").click(function(){ $(".login").hide(); $("div.swap").append("<input name="username" id="username" type="text" maxlength="16" />"); }); }); html: <div class="swap"...

Stop two controls triggering each other's event

Hello, Let's say I have a TabControl with 2 tabs and a TreeView with 2 nodes at the root. I want the application to behave in the following manner : if I click on Node1 from the treeview, the Tab1 from the TabControl should become active. Similarly, when I click on Tab2, I want the Node2 to become selected. And vice-versa. So I simply...

jquery submit inside validation creates too much recursion

because the way jquery dialogs woks, when using a "confirm" dialog, you have to return false immediately, and if the user selects "Ok", then trigger the form submit. so, I'm using this code: function validoForm() { //some code here... if (datosTdcIncompletos==true) { var $dialogTDC= $('<div></div>'...

Collections with component references and form inheritance

Some time ago I developed a component that had TCollection descendant property and items from this collection contained referenced to the controls on the form. Everything was ok with this component except for inheritance. I don't know about the latest versions of Delphi, but with older ones when a collection is inherited there were two v...