forms

Using autofocus and text_field form helpers in Ruby

How do I include the 'autofocus' attribute on an HTML5 form using the text_field form helper in ruby? e.g. <%= f.text_field :email %> Where does autofocus go? Thanks ...

C# Passing WndProc Messages from a form to another form

I'm working on a C# application with two Windows forms. Both forms are full screen and one form sits on top of the other form as a transparent overlay. The bottom form contains a web browser (also full screen). I'm tracking touch input on the transparent overlay form in order to capture gestures and draw buttons and other controls on the...

django insert data from 2 tables using a single ModelForm

Hi there, I want to get data from 2 tables into a form using ModelForm, like this: fist model: class Cv(models.Model): created_by = models.ForeignKey(User, blank=True) first_name = models.CharField(('first name'), max_length=30, blank=True) last_name = models.CharField(('last name'), max_length=30, blank=True) url = mo...

Object synchronization with GUI Controls

Hi, Every time when I change some values in form controls, I need to set a property of an object or vice versa. Instead of writing some methods for each control, I want a general solution for GUI elements. I do not use WPF but only C# 3.0. Any suggestions? Thanks. ...

using fields_for in several places

Hi, I have a simple model class Ad < ActiveRecord::Base has_many :ad_items end class AdItem < ActiveRecord::Base belongs_to :ad end I have an "ads/new" view, that shows me the form for creating the new ad and adding some items to it The .html.erb code is like a following: <% form_for @ad, do |ad_form| %> <!-- some html -->...

Toggle classes with radio button in jQuery

I have a set of radio buttons where when I click a radio button, I want the label to change color or whatever. But when I click another radio button, the color goes away. Therefore I have something like this: jQuery('label').mouseup(function(){ jQuery(this).prev().attr('checked', 'checked'); jQuery('input').next().removeClass('sel...

php mail send form question?

Wondering if anyone know how to automatically send the user an email after he/she fills out a form. I have the form emailed to me after it gets submitted, but I can't figure out how to capture the user's email from the form field and have it send it to them automatically??? Here is some code that I use to send the mail: //mail the me...

Extjs - Dynamically generate fields in a FormPanel

Hi all, I've got a script that generates a form panel: var form = new Ext.FormPanel({ id: 'form-exploit-zombie-'+zombie_ip, formId: 'form-exploit-zombie-'+zombie_ip, border: false, labelWidth: 75, formBind: true, defaultType: 'textfield', url: '/ui/modules/exploit/new', autoHeight: true, buttons:[{ text: 'Execute exploit', hand...

jquery plugin to show form based on select option

I have a form which includes select options with different items. Based on item selected, I need to show respective form on the same page.Does any one know jquery plugin for this or how aesthetically we can do this kind of requirement? ...

Using javascript, show a certain amount of divs based on an answer

I'm building a form that first asks if you have 'foo'. If the answer is 'Yes', a div appears and asks 'How many foo do you have'? Based on the quantity answered, I'd like to show only that many divs. Thus if the user answers 1, only the first div will show. If they answer three, the first three will show. I have it set so that if the use...

POST data disapearing on large file upload

I'm having issues with a file uploading utility in my PHP application. When sending large files (9MB+) over the form, I get a very odd behaviour: the POST data I've included in the form dissapears, including the file information. I've already increased all PHP limits I could (time limit, max input time, post max size, memory limit and u...

Django forms I cannot save picture file

i have the model: class OpenCv(models.Model): created_by = models.ForeignKey(User, blank=True) first_name = models.CharField(('first name'), max_length=30, blank=True) last_name = models.CharField(('last name'), max_length=30, blank=True) url = models.URLField(verify_exists=True) picture = models.ImageField(help_text...

submit form problem

hi I have a problem with "all" of my form submission "search form, login form, register form,.." the problem shows when I submit the form it doesn't take me to the action page, instead it tack me to my root page :"http://localhost/project/Home/" this is a sample of my search form witch search members or groups as the user choose and i...

php quick form creation

Hi, I have been using php from some time and I have noticed that it takes a long time to create a form with validation using php. Are there any scripts or IDE wizards which can assist a programmer to create php forms quickly and also give the programmer flexibility to customize the form easily? I found some webservices which provide suc...

django forms overwrite data when saved

If a have a form, with the data from a user, let's say a CV, and i save the data from the form into a database, but i don't want that a CV from the same user to be stored in the database more than once(when edited form instance) I want it to be overwritten every time it is saved by one same user. How can i do it? thanks a lot ...

Can a simple web form like this get hacked?

Hi I have a web form that sends a string to one php file which redirects them to a corresponding URL. I've searched about web form hacking and I've only received information about PHP and SQL... my site only uses a single PHP file, very basic etc. Would it be open to any exploits? I'm obviously not going to post the URL, but here is some...

Input checkbox name converts period signs into underlines on post

Hello I am working on an image gallery at the moment. When a user is logged in, an x appears over each image and a checkbox next to it to enable the user to delete that image. Only if the checkbox is checked will the image be deleted. They are both in a (one for each image in the gallery), the small image "x.gif" is an input type="imag...

Best way to create preview functionality in Rails

Hi all, I'm looking to implement preview functionality in my posts scaffold. All I need to do is allow a user to enter information in the new view (/posts/new) and then replace the submit button with a preview button. Once the preview button is clicked, the user is routed to the preview page (probably /posts/new/preview). If the user w...

take a screenshot and visually highlight the focused control

After happily using open source software for many years I've figured it's time to give back. And since documentation is usually a weak point for many projects, plus my C# skills are not exactly in high demand in my corner of FLOSS land, I've figured I'll start with tutorials, etc. After the second tutorial for a burning tool, I already ...

Get drop down menu value on Jqery

Hi all Got a simple question. I would like to get a drop down menu value when a use clicks it. I tried to write the code on my own, but couldn't do it. Any helps would be appreciated. My Jquery $("#week").change(function(){ var input=$("week: select").val(); alert(input); //display undefiend My Html <form id="week...