dynamic-forms

Advice with Dynamic Forms in ASP.NET MVC

I am working on rendering a dynamic form in an ASP.NET MVC view that will meet these requirements: Fields can be validated State is preserved when the form is invalid I am looking into creating a custom model binder to achieve this. I am generally planning to do this: Form fields are defined with these properties Prompt (label nex...

ASP.NET MVC render View and retain values when validation fails on a dynamically generated View

I'm trying to build a dynamically generated view. My controller class for Create action looks like this public ActionResult Create() { List<FormMetadata> formItems = GetFormItems(); return View(formItems); } and the View so far is something like this <% using (Html.BeginForm()) {%> <table> <% foreach (var ...

jquery dynamic form error

I'm having trouble implementing this jQuery plugin for dynamic forms while following this tutorial This simple code is giving me an error in Firefox 3.5.5. $(document).ready(function(){ $('#duplicate').dynamicForm('#plus', '#minus', {limit:5}); }); and the error: "$("#duplicate").dynamicForm is not a function" There is an ...

Jquery .keypress on a dynamically added input

Hello, I am currently adding an input via a .click event and then wanting to listen to any keypress that occurs on this input. However, the appended isn't firing any events after it is inserted (i.e. blur, keypress, focus). Does anyone have any suggestions? Thanks in advance! $("#recipientsDiv").click(function(){ $(this).append...

focus() not working in safari or chrome

Hello everyone, I have a div that has been given a tabindex, when the div is focused(click or tabbed to) it does the following: inserts an input into itself, gives the input focus this works great in FF, IE and Opera but in Chome/Safari it gives the input focus but fails to actually put the cursor inside the input (I know it gives it...

JQuery How to Uncheck A radio button

Hello all, I have group of radio buttons. I want to uncheck the check buttons after an ajax form submitted. I have the following function: function clearForm(){ $('#frm input[type="text"]').each(function(){ $(this).val(""); }); $('#frm input[type="radio":checked]').each(function(){ $(this).checked = false; }); ...

PDF form parsing with dynamic rows in table

The continuing saga of PDF form manipulation: I now have a form that allows the user to insert new rows in a table, with associated fields in each row. I cannot find a library (free, commercial, I do not care at the moment) that will extract the contents of all fields, inclding the dynamically added ones. Has anyone any experience wit...

I have a dynamic form with lines addes to the dom with jquery, and the total price seems to be acting strangly

I can add and remove the last line in my dynamic form and calculate the sum of the unit prices but the calculateSumNoTax() function seems to only be fired bu the first line which is output by php, every other line appended to the dom via jquery dont fire calculateSumNoTax(); What am I doing wrong here ? JS : $(document).ready(functio...

In .NET, how do I prevent, or handle, tampering with form data of disabled fields before submission?

Hi, If a disabled drop-down list is dynamically rendered to the page, it is still possible to use Firebug, or another tool, to tamper with the submitted value, and to remove the "disabled" HTML attribute. This code: protected override void OnLoad(EventArgs e) { var ddlTest = new DropDownList() {ID="ddlTest", Enabled = false...

How to Uncheck A radio button

Hi, I have two forms, one with a radio button that users must select to edit. [form name="A"] [input type="radio" name="BookItem" value="1" /] [input type="radio" name="BookItem" value="2" /] [input type="radio" name="BookItem" value="3" /] [form] After "BookItem" is selected from form (A) I call the $("#EditFormWrapper").load("callEdi...

C# web forms api to dynamically create forms

I am working on an asp.net project which has numerous form screens. All our forms are pretty much using a given set layout which needs to be made by developers ond an on again. Our current implementation requires that for every form control, a developers needs to write inside in the .aspx file the HTML of our forms (whilst embedding our...

Dynamically generated form field loses value when new field is added

Hello! I am generating a dynamic fieldset with javascript. For adding fields, I use the following function (this function actually adds more than one field) //add test function addTest() { var location = document.getElementById('addTestLocation'); var num = document.getElementById('addTestCount'); var newnum = (document.ge...

Dynamic form generation without using nested models

Good day! I am a newbie at Ruby on Rails, and part of my previous tasks was to make a dynamic form generator using nested models, as seen in Railscasts 196 and 197 ( http://railscasts.com/episodes/197-nested-model-form-part-2 ). I have successfully implemented it using so. For my current task, however, I need to reproduce the same form m...

robust server side dynamic form engine for ASP.NET

I've recently implemented a simple dynamic forms engine that uses dynamically loaded ASP.NET controls in concert with an EAV schema to handle the variable nature of the data model. The business was sufficiently satisfied with the end product for a time, but is now clamoring for much more complex dynamic forms: Field visibility is tied...

CKEditor Freezes on jQuery UI Reorder

Hi Everyone: I am attempting to reorder a dynamically created list of CKEditors using the jQuery UI framework, but I am having an issue with the editor freeing. It worked perfectally when I was just using a <textarea>, but now, after the dragging action completes, it doesn't let the user write any text. This is the Javascript code: $...

Why is my DotNetNuke page jumping to CKEditor rich text input box?

I am having a problem with this page in Firefox (Chrome and IE seem OK): http://beta.vomero.co.uk/Guestcomments.aspx When the page loads, Firefox jumps to position the rich text box (CKeditor) at the bottom of the page. I don't think this is related to the jQuery Accordion because if I add rich text boxes on other pages the same jump o...

Trying to clean out form inputs with jQuery so I can add it back into the form

I have a pretty simple HTML form where users can enter in information about a person. Below that form is a button which allows them to 'add more'. When clicked, the 'person' form is copied and appended to the page. The way I used to do this was to take my HTML file, copy out the relevant section (the part that gets 'added more') and the...

RoR: ActiveScaffold: How can I make update_column fetaure conditional?

Schema: action_types ------------ id name description actions ------- id action_type_id date description The goal is to copy action_types.description to actions.description only if it is not occupied yet on the UI (!). What is done: class ActionsController < ApplicationController active_scaffold :action do |c| c.columns...

Checking for no input in dynamic fields

Basically, I have a form that generates a certain number of "types of publications" depending on "departments" input before someone is filling out this form. (Department specific publication types that are recognized.) There are a couple of fields that go with each publication type...(they are the same fields, so each type will have ...l...

Drupal Form API: Create Form Elements based on the database values (Dynamic Form Creation)

Hello Everyone, I am creating a form where i have to populate "X" form elements (text-fields to be specific) based on values in the database (X number of elements, properties of each element etc). Is there a way to do this using the Drupal Form API or should i start from somewhere else. I tried using a for() loop in the form generating...