forms

ASP.NET MVC - Html.BeginForm(). Can I post back to a different route and keep existing querystring values?

I have a post-only action that has a different route. In my form, I need to post to it, but also keep the querystring values I currently have. Initial response: /my/first/path/?val1=hello Needs to post to: /my/other/path/?val1=hello It seems when I specify a route, it of course only returns the route and doesn't append the querystrin...

Trouble with jQuery UI Tabs & Cookie Option

I am using the jQuery UI tabs interface and I want to set a cookie (using the jquery.cookie.js script they recommend, from stilbuero.de/jquery/cookie/) to remember which tab was last selected when the page is refreshed. That much was easy, going by the instructions at jqueryui.com. In context, these tabs are going to display search resu...

dynamic html forms

I am working on dynamic form. i have a radio button, if a user select a radio button, i want to populate a drop down menu based on the radio button values. eg. if radio button value=value1 show drop menu of 3 items (apple, banana, mango) eg. if radio button value=value2 show drop menu of 5 items (apple, banana, mango,apricot, ornag...

jQuery - disable input field based on another field selected value

I'm searching for a jQuery plugin that does this. for example: <label><input type="checkbox" depends_on="foo=5" name="boo" ... /> Check </label> <select name="foo" ... > <option value="5" selected="selected">5</option> <option value="15">15</option> <option value="25">25</option> </select> so the checkbox would only be enabled ...

jQuery: Looping over elements writing their ID attribute to an array?

Hello, I'm trying find a bunch of <label>s in a form of mine based on an array of elements and their id attribute. eg. [ input#country , input#other-country ] would be able to find <label for="country"> , <label for="other-country"> and so on… so far I have this code: var LOCATION = {}; LOCATION.option = form.find('input[name=locati...

Rails: best way to validate and display error messages for fields not in model

In my Rails 3 application I have a typical 'Email this to a friend' form that has yours/friend's email and name fields. Each of them must be validated and error messages must be displayed, in a fashion similar to ActiveRecord forms: <%= form_tag %> <div class="fields"> <%= label_tag :friends_name %> <%= text_field_tag ...

dynamically added form field didn't post when form submitted

Hi All, I have a problem with dynamically appended form elements. I have used this code to append form elements $('#wrap_range_'+id).append("<div style='clear:both; margin:0;'></div> <select name='range_"+id+"[]'> <option value=''>-- Select range --</option> <?php for($cnt=10; $cnt<500; $cnt+=10) { echo '<option val...

Mootools - How to create a form and submit this form ?

My idea : when click a filename will get the path of file , then create a form and submit this form, but i don't know how to submit , when submit , undefined form cause elements was created at same time help me, thank ! <p onclcick='startUpload(this.value)'>PATHTOFILE<p> function startUpload(file) { var form = '<...

Benefit of useing UseSubmitBehavior in asp.net button

Benefit of useing UseSubmitBehavior in asp.net button? ...

Uploading a file with cfhttp appends a newline (even on binary files)

Update: I've found a workaround. If I submit a dummy form field along with the file, it works. Is this a ColdFusion bug, or is there something in the HTTP spec that says forms must contain at least one non-file form field? Update 2: I'm convinced this is a ColdFusion cfhttp bug. This is based on Leigh's answer and the fact that I used t...

C# custom control redraw slow

I have a C# Forms program with about 200 controls total. Some are within user controls which I have added to the Form. When I ran my program on my home machine, a Dual core AMD X64, 2.0Ghz with an ATI X1600 card, the program runs fine. It's fast and redraw is not a problem. When I put this program onto my desktop, a quad core Intel 2.4...

Forms in symfony

I am a beginner with symfony, and I can not get my head around forms generation. In theory there even is a form framework, to have complete flexibility. But, as far as I understand, forms are rendered as tables in symfony. I am used to CakePHP where I can output input elements one at a time, and then wrap them as I wish: in tables, divs,...

How do I make an edit users page work on my home page?

Complete rails novice and something just isn't clicking. On my home page /home - I use devise, so I have a check . <% if user_signed_in? %> <%= render "getting_started" %> <% else %> Welcome! <%= link_to "Sign up", new_user_registration_path%> <% end %> At the moment getting_started.html.erb has some instructions and then I'm di...

How do I display PHP form values on the confirmation page?

I have created a simple form that emails the entered values to a designated email. In addition I would like to display the entered / selected values on the confirmation page. I am using the following code: echo '<h2>Thank you for Registering</h2> <h3>You have registered for the following classes</h3> <p>9:10 to 10:00am:...

Posting an array in php(smarty)

Hey, I'm trying to post multiple answers(using checkboxes) in a form. The question is pick what months your available, here is my code... $smarty->assign('month', array( '1' => 'January', '2' => 'February', '3' => 'March', '4' => 'April', '5' => 'May', '6' => 'June', '7' => 'July', '8' => 'August', '9' => 'September', '10'...

How do I use form_for?

I'm trying to create a form to create a user. Currently I have - form_for @user do |f| = "Username" %br = f.text_field :username %br = "Password" %br = f.text_field :password %br = "Confirm Password" %br = f.text_field :password_confirmation %br = "Email" %br = f.text_field :email %br = f.submit "Submi...

3 forms Show and ShowDialog not working as expected, BUG?

I am using Visual Studio 2010, C# .NET 4.0. I have 3 forms: Form1, Form2, Form3. In Form1 I have a button to open Form2: private void button1_Click(object sender, EventArgs e) { Form2 f = new Form2(); f.Show(); } In Form2 I have a private Form3 variable always pointing to the same Form3: private Form3 f = new Form3(); And ...

Bind Console Output to RichEdit

Hello, So pretty straightforward question. I have a c# .dll with a whole lot of Console.Writeline code and would like to be able to view that output in a forms application using this .dll. Is there a relatively easy way of binding the console output to a RichEdit (or other suitable control)? Alternatively, can I embed an actual console ...

FormPreview with djangoforms.ModelForm

I'm confused about which to use djangoforms.ModelForm or django.forms.Form took djangoforms.ModelForm trying form post, preview and edit with same template. post and edit work. Can you point me to an example with combined FormPreview, GAE SDK and djangoforms.ModelForm usage? I try to avoid patch the latest django and think the SDK comes ...

django form subclass for comments

hello im trying to subclass the CommentForm, and I'm not sure if I'm doing it correctly. I'm making those fields hidden, but they aren't rendering that way. from django.contrib.comments.forms import CommentForm from django import forms from django.utils.translation import ungettext, ugettext_lazy as _ class customCommentForm(CommentFor...