Hi, I have the following HTMl:
<input id="brandID" name="brandID" type="hidden" value="" />
<select id="selectList" class="textfield70pc" name="selectList">
<option selected="" value="221">A</option>
<option value="4673">B</option>
</select>
Upon changing the value of a select box, I need to populate this input field.
I've tr...
I'm trying to create simple add/remove form using annotation based Spring MVC.
'Add' functionality comes smoothly, but when I tried to add another button to form i've got stuck.
Here is my code:
Controller actions:
@RequestMapping(value = "/books/documentType.do", method = RequestMethod.GET)
public String getDocType(
@RequestP...
I have an overlay with form (just a radio button group with 3 buttons and a submit button) that, on submit, uses jQuery to open a specific file (a PDF) in a new tab and then close the overlay. The file depends on which button was selected. The problem: the form doesn't actually submit so I don't know how to track submissions, and the cli...
Hi,
My question is about nHibernate, or any other ORM for .net that can do what I am looking for : for my web developements, I use Django Framework; the admin pages are automatically generated, so that you can do the CRUD operations through a GUI -- web interface -- right after having created your model.
I wonder if nHibernate (or any ...
I am currently using a catch all method for all inputs on my form when it is being handled by jQuery.
$.each($(':input'),function()
{
//stuff
});
What I need to be able to do is see if any of those inputs is a checkbox, at the moment the only thing I can find is to say if the field is checked or not.
Any help would be greatl...
How to make all forms in django formset required? I tried to validate presence of all fields in cleaned_data overriding formset's clean() method but it just fails silently without any error displayed.
Thanks!
Source code:
class BaseScheduleForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
super(BaseScheduleForm,...
<% semantic_form_for(@product, :html => {:multipart => true}) do |f| %>
<% f.inputs do %>
<%= f.input :name %>
<%= f.input :price %>
<%= f.input :pno %>
<%= f.input :description %>
<%= f.input :shop_category %>
<% end %>
<% end %>
Product belongs to Shop_category, Shop_category belongs t...
Django is making very nice forms after creating a models.py and an admin.py.
How can I reuse these forms (with the extra nice handling of foreign keys and many-to-many fields) in my own views?
ModelForm does only generate "simple" forms. Where do I get the extra batteries?
...
I want to know about the availability of Forms APIs for ASP.NET, either for MVC or WebForms. I am learning about Django right now, and I really love their forms APIs. Having a similar thing in .net will be very interesting as most of my time is wasted on UI issues.
Microsoft Dynamic Data gives me similar features, but it's not mature en...
If I have a single page with many forms of existing records:
index.html.haml
- for selection in @selections
- form_for selection, :method => :put do |form|
= form.collection_select :user_id, @current_account.users, :id, :full_name
and then this for submits to and update action:
selections_controller.rb
def update
selection ...
Example, for this form:
>>> class CommentForm(forms.Form):
... name = forms.CharField(initial='class')
... action = forms.ChoiceField(...)
Can I have the choices in the action field be different depending on what is in the name field?
...
I want to redefine the required attribute for a field in a clean method of my form file:
class NewUserFullForm(NewUserForm):
REGEX_PHONE = '^(\+[0-9]{2})[ \.\-]?[0-9][ \.\-]?[0-9]{2}[ \.\-]?[0-9]{2}[ \.\-]?[0-9]{2}[ \.\-]?[0-9]{2}$'
phone = forms.RegexField(REGEX_PHONE, help_text='Ex : +33 1 34 12 52 30')
fax = forms.RegexField(REGEX_...
Consider the following Django models:
class Host(models.Model):
# This is the hostname only
name = models.CharField(max_length=255)
class Url(models.Model):
# The complete url
url = models.CharField(max_length=255, db_index=True, unique=True)
# A foreign key identifying the host of this url
# (e.g. for http://w...
As the title states my Ajax call is actually causing the form to be submitted to its default action, why? I've never come across this before, all my other ajax calls have never done this.
function newAjax(t,u){ //t = type(post/get), u = url
var resource = null;
if (window.ActiveXObject) {
resource = new ActiveXObject("Mic...
The "select" form component in grails can have the form:
<g:select name="user.age" from="${0..59}" value="${age}" noSelection="['':'-All-']"/>
But if I need to add other options aside from the numbers, how would I do that (example options are: 0..59, All, "/5", "/10", etc,...)
Thanks
...
Hi,
I dont know much about joomla but I have a problem.
I started reading for the chromoform and it is a very nice pugin.
I created a form which I can see in the form manager and also I can view in the url.
but I want ot integrate it to an existing content.
I have a content which contains text, photos etc..
The content is editable with ...
What is the best way to stop a form from being reprocessed when a user hits a Back button?
I'm following the Post/Redirect/Get pattern, so I don't have a problem if F5 is pushed, but the back button still provides the opportunity to resubmit the form. If this form is a credit card processing page, this is bad.
This question has been a...
Whenever I'm to prepare a long form for the client I always want to split it into separate pages, so the visitor doesn't have to fill it all, but does it in steps.
Something like:
Step 1 > Step 2 > Step 3 > Thank You!
I've never done it for one reason: I don't know how to store the data from separate steps efficiently? By efficien...
I am using .NET 3.5.
Also, Forms Authentication is used.
Is there any way to get the list of ALL logged-in users or a count in ASP.NET?
Note: I am not using Memberships and Roles
...
My app uses javascript to generate all the HTML for my website. The index.html basically just contains
<div id="menu"></div><div id="content/><div id="content2/>
And the javascript replaces the divs. I find myself doing a lot of repetitive tasks when I need to create a form.
var html = "<form id="form1"> ... </form>";
Is there a go...