forms

Form errors not showing in Ruby on Rails.

Hello. I'm trying to create a registration form with Rails. It's working, but it doesn't displays the errors from the validation (it validates, but the errors don't display). Here are my files: # new.html.erb <h1>New user</h1> <% form_for :user, :url =>{:action=>"new", :controller=>"users"} do |f| %> <%= f.error_messages %> <p> ...

Django Formset without instance

Hi. In this Django Doc explain how to create a formset that allows you to edit books belonging to a particular author. What I want to do is: Create a formset that allows you to ADD new book belonging to a NEW author... Add the Book and their Authors in the same formset. Can you gime a light? thanks. ...

How to prevent Satchmo forms from displaying asterisk after required fields?

I'm customizing my Satchmo store forms and have an icon that appears before any required fields. The problem is, Satchmo seems to want to render a text asterisk after the required fields. I'm using field.label to get this label, should I be using something else? EDIT: All my form templates are hard coded. I have an inclusion tag that...

How to easily duplicate a Windows Form in Visual Studio?

How can I easily duplicate a C#/VB Form in Visual Studio? If I copy & paste in the Solution Explorer, it uses the same class internally and gets messed up. How do you do it? ...

InlineFormSet with queryset of different model

What we're trying to do is populate a list of inline forms with initial values using some queryset of a different model. We have products, metrics (some category or type or rating), and a rating, which stores the actual rating and ties metrics to products. class Product(models.Model): name = models.CharField(max_length=100) pric...

HTML interface to RESTful web service *without* javascript

Even if I offer alternatives to PUT and DELETE (c.f. "Low REST"), how can I provide user-friendly form validation for users who access my web service from the browser, while still exposing RESTful URIs? The form validation problem (described below) is my current quandry, but the broader question I want to ask is: if I go down the path of...

[jQuery] Validate select box

I'm using the jQuery plugin Validation to validate a form. I have a select list looking like this: <select id="select"> <option value="">Choose an option</option> <option value="option1">Option1</option> <option value="option2">Option2</option> <option value="option3">Option3</option> </select> Now, I want to make sure that the user s...

2 HTML forms side to side

I need to put a Confirm button and a cancel button in a page. I chose to create to forms with different actions, but the 2 buttons (forms) are not displayed side-to-side. How do we do it without a table? Thank you! ...

Multiple form names to get values using Coldfusion -- form to pdf -- cant use JS

My apologies if I worded the title wrong. I've got a large table with multiple input boxes and need to get the values of the internal cells. I am able to get the dates, gas amounts/totals, and the totals, but not the rest. I need still to be able to get every other input box's value. I am not too sure where to go with this one, but...

Extract form fields using RegEx

I'm looking for a way to get all the form inputs and respective values from a page given a specific URL and form name. function GetForm($url, $name) { return array ( 'field_name_1' => 'value_1', 'field_name_2' => 'value_2', 'select_field_name' => array('option_1', 'option_2', 'option_3'), ); } GetForm('http:/...

jQuery: issue with live events, a form and the back button

Hi, I have build a quite complex widget which contains "some kind of form". It has a form tag, but I'm loading a lot of stuff in there via Ajax etc. Cannot explain it in detail, and the code is too long to paste in here. Now, in a "live('click', function()" I use for one of the form fields, I'm writing a couple of values into hidden fi...

Passing variables across a multi page form in php

Forgive me as I am a newbie. I have a multi page form in which I am using $_SESSIONS to record the variables. <?php session_start(); foreach ( $_POST as $key=>$value ) { if ( $key!="submit" ) { $value= htmlentities(stripslashes(strip_tags($value))); $_SESSION[$key] = $value; } }` I have two problems actually. W...

Disabling parts of the SaveFileDialog

Hi, I'm building an application where I need to use a saveFileDialog. The problem is that I want to restrict the users from using some parts of the saveFileDialog (e.g. I don't want them to edit the name of the file). I've heard that it's very difficult to do this using Windows forms SaveAsDialog. Do you know how to do this in native c...

Math formulas on a static HTML page

I need to create the below on my page but don't know how to code it. I am not a programmer so please be as specific as possible. Thanks. If you have [ -- USER INPUTS VALUE HERE -- ] referrals and they refer [ -- USER INPUTS VALUE HERE -- ] who refer [ -- USER INPUTS VALUE HERE -- ] more, you will earn [ -- VALUE BASED ON FORMULA* HERE -...

Fill out a form on click?

What would be the best way to fill out a form on an html page when someone clicks a link. The best example i can think of is on *chan sites, where a user clicks on the ID of a comment and that ID is then inserted into the comment Text Area. ...

ie7 inserts line break after / before form tag

I'm sure someone has noticed this before but I can't seem to find a solution. In IE7 before and after form tags IE inserts line breaks. This is no good! Sample code below... Solutions? Ideas? <html> <body> <div id="pageContent" style="border:1px solid black; background-color:orange;"> <form> content bad <...

[Delphi] How can parent form tell if a non-modal form is still open?

If a Modal form creates a form and does .Show, how can the parent later determine if the non-modal form is still open or if the user closed it? ...

Send forms to seperate pages for handling, or back to the same page?

Is it better to send an html form to a seperate page, or send it back to the same page?? i keep hearing to seperate logic from presentation, so I was wondering if I should seperate my forms from my form handlers as well. As of now, Im doing this... <?php if(isset($_POST['submitted'])){ //Validate the form if(empty($_POST['name'...

Using Python Mechanize like "Tamper Data"

I'm writing a web testing script with python (2.6) and mechanize (0.1.11). The page I'm working with has an html form with a select field like this: <select name="field1" size="1"> <option value="A" selected>A</option> <option value="B">B</option> <option value="C">C</option> <option value="D">D</option> </select> In ...

Forms, Post and submit buttons

I feel a little silly asking this but I wanted everyones opinion on it. I want to submit a page, target itself, on the press of a button but carrying one piece of data with it. Example: Edit | Delete On the click on edit, I want the page to reload with $_POST['example'] === "edit" or something. I don't want to use $_GET and I don't w...