forms

WinForms programming - Modal and Non-Modal forms problem

I have a problem with modality of the forms under C#.NET. Let's say I have main form #0 (see the image below). This form represents main application form, where user can perform various operations. However, from time to time, there is a need to open additional non-modal form to perform additional main application functionality supporting...

Find, Find Next?

Hello everyone, I am trying to make a find, find next function for my program, which I did manage to do with this code: int findPos = 0; private void button1_Click(object sender, EventArgs e) { try { string s = textBox1.Text; richTextBox1.Focus(); findPos = richTextBox1.Find(s...

How do I create a form that uses custom variables for a serialized field in rails?

MODEL: class Listing < ActiveRecord::Base serialize :details validates_presence_of :name, :details end VIEW: <% form_for(@listing) do |f| %> <div class="text_field"> <%= f.label :name, "Name" %><br /> <%= f.text_field :name, :autocomplete => "off" %> </div> <!-- CUSTOM DETAILS HERE! --> <% end %> ...

Loading template with variables from form fields using jQuery & php

I am trying to create a form that generates an html template. I have the template in a hidden div on the page and am using jQuery to create a new window with the template html, but I can't figure out how to load the contents of the form fields into the template. I know I should probably be using AJAX, but I don't know where to start. ...

[Rails] Accessing error_messages on form_tag

I have built a custom form for creating a joining model on a has_many :through relationship. The models look roughly like this: class Team has_many :team_members has_many :members, :through => :team_members end class Member has_many :team_members has_many :teams, :through => :team_members end class TeamMember belongs_to :tea...

Numerical /currency pre-formatted in a form displays and stores incorrect values

I have a form field that uses some Javascript to format user input 'price' field from say 1000 to 1,000.00 in real time before the form is submitted ..when I submit the form some PHP is reading the data and printing the results Javascript bit is num = num.substring(0,num.length-(4*i+3))+','+ PHP bit is 'price' => number_forma...

Method of getting text on a windows form ( unmanaged C++ project )

I'm in the process of learning C++. I've created a boilerplate Win32 app within VC++ 2008. I've studied through the code and am ready do do a bit of experimenting. I thought it would be cool to print all the windows messages received in the message loop to the form created via the boilerplate code. I for the life of me, can't figure out ...

Prevent change of hidden field

What if I have ChangePassword form with hidden ID field of the user. BadPerson knows id of GoodPerson. He opens Change Password form with FireBug, changes his Id to GoodPerson's Id, so password changes for GoodPerson. Of course I can create some server logic that will prevent this, but I think there should be some out of the box solut...

Howto: Access a second related model in a nested attribute builder block

I have a basic has_many through relationship: class Foo < ActiveRecord::Base has_many :bars, :dependent => :destroy has_many :wtfs :through => :bars accepts_nested_attributes_for :bars, :wtfs end On my crud forms I have a builder block for the wtf, but I need the label to come from the bar (an attribute called label for instanc...

[Zend Framework] Forms and success output

Well, It's a beginner's question but I really don't know what is the best way. I have a basic CRUD (Create, Retrieve, Update and Delete) in my project and I'd like to output some message if succeeded or not in a div inside the same page. So, basically, I have a form which action is set to the same page and I have a div #statusDiv below...

insert into database from Joomla form fields

Dear All, I am beginner to Joomla development, I have created a very simple module, How to create a form of three textfields in it, and then insert textfields data into database /. Any one can help ? ...

Can't save form content to database

I'm trying to save 100 characters form user in a 'microblog' minimal application. My code seems to not have any mystakes, but doesn't work. The mistake is in views.py, I can't save the foreign key to user table. models.py looks like this: class NewManager(models.Manager): def create_post(self, post, username): new = self.model(po...

How to detect if a form input element of type file is empty

I have some code which reads a file through a form field of type file <input type="file" ... /> I want to give the user another option of providing a url to a file rather than having to upload it as many are already online. How can I detect when this field is empty on the server side. I am using Apache Commons FileUpload FileItemSt...

WinForms (C#) Databinding Object to Checkbox.Checked Property

Hello, I'm writing a WinForms app, and am trying to bind a boolean property on a .NET object to a Checkbox's "checked" property. I am successfully creating the binding, but when I change the source property's value from false to true (I have a button that toggles it), the checkbox's "checked" property does not reflect that change. if (...

Propel automatic form

Hi, I'm just starting with Propel and for more rapid development I'm curious if there is anything like automatic forms. Something like default administration in Django. I want to be able to output a form or to get all information I'll need. Even in the objects I didn't find all information which should be necessary to have everything for...

How can I make my password fields always empty?

I have a form field where users can change their passwords, but if they set their settings to remember passwords, their password shows up. Is there a way to make the field always empty? So that they always have to type their password. <label for="oldpassword" class="styled">Old password:</label> <input type="password" id="oldpassword" n...

Processing variable number of form fields

I am working on a form which displays information about orders. Each order has a unique id, but they are not necessarily sequential on the form. Also, the number of fields can vary (one field per row on the form). The input into the form will not be mapped straight into the database, but will be added to the current value in the datab...

OpenArgs Problem in Access

I have a code like this: Dim strResponses As String strResponses = Forms!frmResponses.QstnID.OpenArgs If Len(strResponses) > 0 Then Me![QstnID].DefaultValue = Me.OpenArgs End If When I run it, its gives error 438. Can someone help me to know where the error is? ...

Results page in other window.

I have this simple form: <form method="post" action"."> <input type="text" name="title"> <input type="submit" name"send"> </form> I want that when a user click on submit, then will be open another window of browser with the results. Is it possible ? ...

Javascript "inlet" or "offset" function for drop-list options

I have seen on several sites that drop list values can have offsets... For example this drop-list: Fruits Apple Banana Orange Colors Red White Black The above are all options, but some have "inlets" or "offsets" or whatever you want to call it. How is this done with js? (regular js, not jquery at the moment) Thank...