forms

Django: using ForeignKeyRawIdWidget outside of admin forms [Solved]

I'm trying to find some documentation of how to use the ForeignKeyRawIdWidget in my own forms. Currently I keep getting the error, "init() takes at least 2 non-keyword arguments (1 given)" which tells me nothing. Any help would be most appreciated. Googling this turns up little but dev conversations and no examples that I can find of ho...

Programmatically change the startup form on application launch?

Can I programmatically change the startup form on application launch in VB.Net? ...

submit all input elements on a page

Is there an easy way to submit all input elements on a page? I have a very customisable page where the user can add and remove rows from multiple tables. The rows contain various different input elements. Do I have to put each table inside a form and then on submit have javascript to submit all the forms? ...

input type select how we pass default value in select box in cake php

e($form->select('gender',array('Male'=>'Male','Female'=>'Female'),null,'selected'=>'Female',false)); ...

Problem passing URL variables in post form submission with CakePHP FormHelper

Hi there, I'm writing my first CakePHP application and am just writing the second part of a password reset form where a user has received an email containing a link to the site and when they click it they're asked to enter and confirm a new password. The url of the page is like this: /users/reset_password_confirm/23f9a5d7d1a2c952c01af...

how to write a jquery event handler for dependent auto - complete fields ?

I have a form with 2 text fields which get populated using auto complete. Now when I enter some value in form 1 (through autocomplete ), I want the second form field to fetch the auto complete values using text entered in field1 as one of the parameters. Lets say , text 1 < contains car brand names which are auto populated > text 2 < ...

Implementing placeholder="" for opera through jquery

I have implemented through jQuery the placeholder HTML 5 attribute for the browsers that don't support it (all except webkit at this time). It works really great but it has a small problem: it breaks the HTML 5 required="required" and pattern="pattern" attributes on Opera (it's the only browser that supports them currently). This is be...

How do I set the target frame for form submission in ASP.NET?

I have an asp.net page in an iframe where all links target _blank <base target="_blank" /> But I want the form on it to submit to _self (i.e. the iframe where the page is located) when the one button is clicked. The form is an <asp:Panel> with an <asp:Button> control for submitting it. Where can I set the target for this form? Since ...

example of a simple Facebook dialog containing a form posting params back to rails controller

I have an FBML canvas app and I have a few places that I currently display forms in their own pages, but we'd like to move these to dialogs. So, could someone give an example of using a link to popup a dialog with a form in it and handling the submission of that form in the controller? ...

Recommendations for HTML/Ajax multiple select with autocomplete library or plugin

I'm looking for a library or jquery plugin (etc) for a dynamic, multi-value form selector. Think of gmail's "TO" field when composing email. Looking for: Populate field(s) with 0 to n employee ids. Currently have 5000 employees. First or last name searching. I've rolled my own in the past. However I'm trying to focus my de...

How do I resolve JavaScript error "not defined"?

This form works in Safari. In IE, it mostly works, but I get an error "Object doesn't support this property or method." on line 240. In Firefox, no alert box appears, but the following error appears in the error console: Error: myform is not defined Line: 240 (line 240 is below, starting with the word if) <script type="text/javascr...

form tag - is it required on ajax sites?

i recently was working on an ASP.NET MVC site that basically serves static html and uses ajax gets to return data to the page when inputs are changed. there is actually no posting or getting from an html input tag on the pages at all. (it is a specific style of site that is not used by the general public, so having compatibility problems...

Cannot access data from jquery ajax request, returns empty array

Hi, I have a form that is called via the fancybox plugin http://fancybox.net/blog - login example Here is the code I have: Form: <form method="post" action="" id="events_form"> <p class="clearfix"><label for="Name">Name:</label> <input type="text" name="Name" id="Name" /></p> <p class="clearfix"><label for="Company">Company:</l...

how to select input field in listed form with jquery

Hi, I got several forms listed through a loop at one page such like this: (extract) if(mysql_num_rows($r)>0): while($row = mysql_fetch_assoc($r)): ?> <form id="myForm" action="save_fb.php" method="post"> Title: <input type="text" name="fb_title" value="<?php echo $row['fb_title']; ?>" /><br> <a href="javas...

Using a checkbox input on a form to send the form data to different email addresses

I am building a form for a client. Here is the rundown. The form will be used as a request to have a staff member contact the person filling out the form. However, there is a list of staff members that will contact them depending on what the subject matter is. So, I want to create a checkbox input section on the form with each staff pers...

Options for handling a frequently changing data form

What are some possible designs to deal with frequently changing data forms? I have a basic CRUD web application where the main data entry form changes yearly. So each record should be tied to a specific version of the form. This requirement is kind of new, so the existing application was not built with this in mind. I'm looking for dif...

Little help on making a function which disables some form elements

I have several DIVs on a page. Inside these DIVs I have several form-elements such as inputs and selects. I also have two radio buttons. I want whenever radio nr2 is clicked, to disable ALL OTHER ELEMENTS inside the active DIV. Here is one of my DIVs and its content: <div id="test"> <select name="cars_mile_to" id="cars_mile_to" sty...

Remember "Radio" value when submitting form to self on php page?

On a text input, this is how you would "remember" the value the user entered if the form gets submitted to itself, for say a picture upload tool which requires that, so the user wont have to type everything into the form again after uploading a picture. <input type="text" id="text" name="text" value="<?php echo @$_POST['text'];?>"> ...

jQuery show/hide different sets of form elements on same hyperlink

I have a form which can have up to 6 children added to it. Therefore there will be 6 sets of the following HTML: <table class="portletTable child" cellpadding="0" cellspacing="0" border="0" summary="Please enter some more details regarding your dependants"> <tr> <th> <label fo...

How to make js code invisible?

I have a php page, where at the bottom of the page I have some javascript code. I use php inside the javascript code, like this: alert ("<?php echo $variable; ?>"); If I put this in a separate file, this wont work for some reason. Is there anyway to make it work from a separate file without too much difficulty? Or is there another w...