field

django new field generating "global name...is not defined" error

Hello, In a django app, I have models for a Word (to be learned), a Student (learning it), and StudentWord is a table to handle the many to many relationship: class Word(models.Model): word = models.CharField(max_length=80) image = models.ForeignKey(Image) language = models.ForeignKey(Language) def __unicode__(self): ...

Django ModelForm with extra fields

I have done a ModelForm adding some extra fields that are not in the model. I use these fields for some calcualtions when saving the form. The extra fields appear on the form and they are sent in the POST request when uploading the form. The problem is they are not added to the cleaned_data dictionary when I validate the form. ¿How can I...

Looking to change / replace an image when a text field onfocus

Hi - I am looking for a solution to replace an image with another image when you focus on a text field. There are 4 text fields and 5 images (1 image is the default image) When you focus on each of the text fields, the correct image should replace the default image.. Thanks for any guide on this ...

Validate 1 of the 2 fields with asp.net validators

Hello, I've got a simple form with some textboxes. These textboxes all have a RequiredFieldValidator. If field 1 is filled in I need to disable the RequiredFieldValidator of field 2 because only one of these fields is required. What is the best way to accomplish this? ...

iPhone: Create Custom Field in contacts

hi all, i am developing a application in which i add contact to contact List. i am able to basic info like name, address, email, phone, notes etc. but i want to add some custom field like userLabel1, userValue1 , bioPersonal, bioWork, bioOther. so i want to add custom fields to address Book'contacts. whether it is possible to add custo...

Javascript if box checked.

Hello, i have this form for adding videos. Now, there's a input field for "title" and i want that to disappear if you have pressed on the checkbox "tryout". How should i do that in JS.. i use jquery. ...

[Wordpress Coding] About Optimizing Querying Posts by Custom Fields

Hi all first .. sorry 4 my english :) i am web developer and using wordpress as framework for any Customized CMS i want build if i want to make a video Cms for example and want to make keys for videos instead of ID'S each video is post has ID , and Customfield ( "vkey" => "1A2B3C" ) each post will have the customfield ( "vkey" ) so...

JS Show field when checked

Hello. How do i show an input field if #tryout checkbox is checked. I already have this which hides 2 fields, now i want to show 3 new fields..: $('#tryout').click(function () { $('#title').toggle(!$(this).attr('checked')); $('.navn').toggle(!$(this).attr('checked')); }); ...

On subsonic3 How to get the name of a field from a table, and the max length, type etc

How to get the string-name of a field from a table on subsonic 3? On subsonic version 2 I use the TableName.columns.Field Also in subsonic 2 I have the opportunity to get the max length of a string field. How can I do that on subsonic 3 ? Thank you in advanced. ...

Proper usage of "this." keyword in C#?

Hi all, I'm working through the book Head First C# (and it's going well so far), but I'm having a lot of trouble wrapping my head around the syntax involved with using the "this." keyword. Conceptually, I get that I'm supposed to use it to avoid having a parameter mask a field of the same name, but I'm having trouble actually tracking ...

Return selection of fields from a Model in django

Hay guys, i want to use something like this users = User.objects.all() but i only want to return a couple of fields for each result, say 'name' and 'email'. This data is going t be turned into JSON data, and some fields in my model are sensitive. How would i do this in django? ...

Hiding "Group By" value in a Content Query Web part

Hello I'm making a Sharepoint 2007 Content Query web part, where I want to group by a field (ArticleSticky), but I don't want to show the field in the webpart. Is there some way I can hide the field in the webpart? Maybe in the XSLT definition ? ...

DOB form input field

How can i create a form using 3 inputs for DOB 01/01/1982 but only having 1 field name in order to prepopulate a form. input 1 = MM input 2 = DD input 3= YYYY.......but the 3 combined only have on field name? ...

How to dynamically populate a choices widget in symfony?

Suppose there is an image_url column in database. I want the user to choose from several recommended images,which is something like this: <input type="radio" value="domain.com/path_to_img1" name="image_url" /> <img src="domain.com/path_to_img1" /> <input type="radio" value="domain.com/path_to_img2" name="image_url" /> <img src="domain....

Relate field control ID in the page layout

Hi, I am facing a problem while referencing the field control in the page layout. In this article there is a field control which id is "PGPageBottomLeftContent" which store the data in the column "PageBottomLeftContent". I am not able to know that how it stores the data in the perticular column however the column name is different. It...

Impossible to create interface field when copy an object

given this class definition: public class Frame { IFrameStream CapturedFrom; } I want implement Clone() method in this class, but problem is: How to create the IFrameStream field in the destination instance? - I just don't know its implementation, how to create the instance? ...

C++ function-like value pass

Hi, first, sorry for the title but I really don´t know ho to summarize what I want to do. I am trying to write very simple "graphic" console game, just to learn basics of C++ and programming generally. When I have a function, I can pass value, or variable into that function while calling it. But I would like to do the same thing to the p...

MySQL: Counting most occurrences of a field's value

Given the following query, how do I return the p_name with the most transactions? And similarly, how do I return the t_amount with the most transactions. I'd like to do it all in this one query of course. SELECT t.*, p.* FROM transactions t LEFT JOIN partners p ON p.id=t.partner_id which can return something like: t_amount t_pla...

How can I get access to a Django Model field verbose name dynamically ?

I'd like to have access to one my model field verbose_name. I can get it by the field indice like this model._meta._fields()[2].verbose_name but I need to get it dynamically. Ideally it would be something like this model._meta._fields()['location_x'].verbose_name I've looked at a few things but I just can't find it. ...

Longer Form Fields in Drupal

I have a really silly problem that has cost me a load of time already. I have created a content template with a URL in there. When I look at the HTML code for it, I see a big fat "maxlength=256" in the form tag. I'd like to expand the length of this field, because my customer wishes to enter really long links (over 500 characters). Any...