dynamic-forms

vb6 call form with name contained in array

左心房为你撑大大i 提交于 2019-12-02 06:52:41
问题 I have an Array named Menus. It contains a form name per element. How can I call them dynamically? For example, if Menus(1) = "Login" , and Menus(2) = "Logout" I need to say Login.Show but I want to do this using the Array name. I clearly can't do this: Menus(X).Show Is this possible in VB or is there a way around this? Thanks in advance! 回答1: What you're essentially trying to do is use a form's name to instantiate and load a form. One way to do this is to pass a string with your form's name

using has_many through with dynamic forms rails 4

元气小坏坏 提交于 2019-12-02 04:55:58
I want to create an appointment form with dynamics forms. But I'm not getting what I'm doing wrong I'm having trouble with the partial _appointment_record_form_fields and with appointment_controller. Someone can help me fix the controller and the view? My Models: class Appointment < ActiveRecord::Base has_many :appointment_record_forms, dependent: :destroy has_many :record_forms, through: :appointment_record_forms accepts_nested_attributes_for :appointment_record_forms, allow_destroy: true end class AppointmentRecordForm < ActiveRecord::Base belongs_to :appointment belongs_to :record_form

angular2 dynamic form calculate amount total

旧时模样 提交于 2019-12-01 11:56:29
Trying to calculate a total payOffs.amount (payOffs is a FormArray). Not sure how to do it properly so the total would observe changes to current and new for amounts. Here is a plnkr that I took as a base code: http://plnkr.co/edit/nHSIsciSZNTQzQjxkXsk?p=preview <form (ngSubmit)="onSubmit()" [formGroup]="form"> <label>Name</label> <input type="text" formControlName="name" [(ngModel)]="myModel.name" placeholder="Name"> <p>Pay Offs</p> <table class="simple-table"> <tr> <th>Amount</th> <th>Date</th> <th>Final?</th> <th></th> </tr> <tbody> <tr *ngFor="let po of form.find('payOffs').controls; let i

CKEditor freezes on jQuery UI Reorder

六眼飞鱼酱① 提交于 2019-12-01 04:34:34
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 perfectly 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: $(function() { $("#list").sortable({ placeholder: 'ui-state-highlight' }); $("#list").disableSelection(); for (i=0;i<10;i++) { addEditor(); } }); function addEditor() { alert("Hello"); var editor_fields = document.editors.elements["editor[]"]; var editorAmount = 0; if (editor

CKEditor freezes on jQuery UI Reorder

做~自己de王妃 提交于 2019-12-01 02:37:17
问题 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 perfectly 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: $(function() { $("#list").sortable({ placeholder: 'ui-state-highlight' }); $("#list").disableSelection(); for (i=0;i<10;i++) { addEditor(); } }); function addEditor() { alert(

Jquery .keypress on a dynamically added input

老子叫甜甜 提交于 2019-11-30 16:12:42
问题 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('< input type="text" id="toInput" class="inlineBlockElement" style="border:0px none #ffffff; padding:0px; width:20px; overflow:hidden;" />') $("#toInput").focus(); }); $(

ASP.NET MVC Dynamic Forms

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-28 15:49:35
Can anyone suggest a good way to develope dynamic forms with ASP.NET MVC? I have cascading dropdowns on the page (options in the dropdown depends on the value, selected in the previous dropdown). All the values come from the database. How can I implement such behavior using ASP.NET MVC? Of course I'd like to receive all the values in the controller when I submit my form. You can do this very easily using my FormFactory library. By default it reflects against a view model to produce a PropertyVm[] array: ``` var vm = new MyFormViewModel { OperatingSystem = "IOS", OperatingSystem_choices = new[]

How to Uncheck A radio button

六眼飞鱼酱① 提交于 2019-11-28 09:07:05
I have two forms, one with a radio button that users must select to edit. [form name="A"] <li>[input type="radio" name="BookItem" value="1" /]</li> <li>[input type="radio" name="BookItem" value="2" /]</li> <li>[input type="radio" name="BookItem" value="3" /]</li> [form]<p> After "BookItem" is selected from form (A) I call the $("#EditFormWrapper").load("callEditData.cfm? ID="+ID); function to load the second form (B) <div id="EditFormWrapper"><div></p> <!---// begin dynamic form generated by external file callEditData.cfm //---> [form id="editForm" name="B"] <ul class="hourswrapper"> <li>

ASP.NET MVC Dynamic Forms

我的未来我决定 提交于 2019-11-27 09:35:34
问题 Can anyone suggest a good way to develope dynamic forms with ASP.NET MVC? I have cascading dropdowns on the page (options in the dropdown depends on the value, selected in the previous dropdown). All the values come from the database. How can I implement such behavior using ASP.NET MVC? Of course I'd like to receive all the values in the controller when I submit my form. 回答1: You can do this very easily using my FormFactory library. By default it reflects against a view model to produce a

focus() not working in safari or chrome

ⅰ亾dé卋堺 提交于 2019-11-27 09:02:09
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 focus because the safari/chrome focus borders appear). Any suggestions as to what is going on? I have to fix the key handler after this so the arrow keys and backspace keys work too, feel free to chime in on that if you'd like. Thank you in advance! Here's a sample of the code: