Search Results

Search found 23 results on 1 pages for 'subforms'.

Page 1/1 | 1 

  • Zend_Form using subforms getValues() problem

    - by wiseguydigital
    Hi all, I am building a form in Zend Framework 1.9 using subforms as well as Zend_JQuery being enabled on those forms. The form itself is fine and all the error checking etc is working as normal. But the issue I am having is that when I'm trying to retrieve the values in my controller, I'm receiving just the form entry for the last subform e.g. My master form class (abbreviated for speed): Master_Form extends Zend_Form { public function init() { ZendX_JQuery::enableForm($this); $this->setAction('actioninhere') ... ->setAttrib('id', 'mainForm') $sub_one = new Form_One(); $sub_one->setDecorators(... in here I add the jQuery as per the docs); $this->addSubForm($sub_one, 'form-one'); $sub_two = new Form_Two(); $sub_two->setDecorators(... in here I add the jQuery as per the docs); $this->addSubForm($sub_two, 'form-two'); } } So that all works as it should in the display and when I submit without filling in the required values, the correct errors are returned. However, in my controller I have this: class My_Controller extends Zend_Controller_Action { public function createAction() { $request = $this->getRequest(); $form = new Master_Form(); if ($request->isPost()) { if ($form->isValid($request->getPost()) { // This is where I am having the problems print_r($form->getValues()); } } } } When I submit this and it gets past isValid(), the $form-getValues() is only returning the elements from the second subform, not the entire form.

    Read the article

  • Winforms MVP with Castle Windsor - DI for subforms?

    - by Paul Kirby
    I'm building a winforms app utilizing passive-view MVP and Castle Windsor as an IoC container. I'm still a little new to dependency injection and MVP, so I'm looking for some clarity... I have a main form which contains a number of user controls, and also will bring up other dialogs (ex. Login, options, etc) as needed. My first question is...should I use constructor injection to get the presenters for these other views into the main view, or should I go back to a Service Locator-type pattern? (which I've been told is a big nono!) Or something else? Second question...the user controls need to communicate back to the main form when they are "completed" (definition of that state varies based on the control). Is there a standard way of hooking these up? I was thinking perhaps just wiring up events between the main presenter and the child presenters, but I'm not sure if this is proper thinking. I'd appreciate any help, it seems that the combination of MVP and IoC in winforms isn't exactly well-documented.

    Read the article

  • "Subforms" associated with tree view in VB

    - by knomdeguerre
    I am using VB Express 2008 to demonstrate my ideas for an improved UI for an existing product for my colleagues at work. The current UI has a certain page with ten tabs, allowing the user to define up to ten "things". The available choices for each of the ten "things" are all the same. On each of the ten tabs, there is a checkbox to enable that definition. Generally, a user will never use more than 5 or 6 unique definitions, the rest will remain disabled. So far, my prototype has a tree view control with one branch to contain this list of definitions, Add and Delete buttons. My idea is: there is one sub-branch to start with (corresponding to the first tab in the current UI); if the user wants addtional definitions, they click Add and other branches are added to the tree view, up to maximum of ten. I think I should be able to create a "class" that has a sub-UI (like a sub-form in Access) along with behavior code, that can be instantiated with each press of the Add button; each instantiation's settings can be set independently and is displayed in the main UI form )in a panel or frame) when selected in the tree view. For example, suppose the user Adds to make a total of three definitions: the tree view now has three sub-branches, each of which presents the same sub-UI with settings that can be set specific to the selected sub-branch. I'm sure it's possible but not sure how to do it. I know a comprehensive "answer" might be complicated and long, but I may just need some quick hints to get underway - don't be shy! Thanks in advance!

    Read the article

  • Change a subform's recordsource from another subform in Access

    - by Dkellygb
    I am using MS Access 2003 and I have a form with two subforms (subform1 and subform2) which are not nested. They both display tabular data on them so they cannot be nested. I would like to change the recordsource on subform2 based on a value in the current record on subform1. I have tried to put the code in the oncurrent event of subform1 but I cannot seem to refer to the recordsource in subform2 from subform1. From subform1 I have tried me.parent!subform2.form.recordsource but I get a runtime error ‘2455’ You have entered an expression that has an invalid reference to the property form/report. Any ideas?

    Read the article

  • New to programming

    - by Shaun
    I have a form (Quote) with an auto-number ID, on the form at the moment are two subforms that show different items (sub 1 shows partition modules sub 2 shows partition abutments) both forms use the same parts tables to build them. Both forms are linked to the quote form using the ID. All works well until the forms is refreshed or re-loaded, subform 1 shows the module names and quantities and blank spaces for the abutment names but shows the quantiews for the abutments, the reverse of this is shown in the abutments subform 2. When the lists for the variuos types and the detailed parts lists are printed they are correct. This seems to be only a visual problem. All based on Access 2003. Subform 1 SELECT Quote_Modules.ModuleID, Quote_Modules.QuoteID, Quote_Modules.ModuleDescription, Quote_Modules.ModuleQty, Quote.Style, Quote.Trim FROM Quote INNER JOIN Quote_Modules ON Quote.QuoteID=Quote_Modules.QuoteID ORDER BY Quote_Modules.ModuleID; Subform 2 SELECT Quote_Modules.ModuleID, Quote_Modules.QuoteID, Quote_Modules.ModuleDescription, Quote_Modules.ModuleQty, Quote.Style, Quote.Trim FROM Quote INNER JOIN Quote_Modules ON Quote.QuoteID=Quote_Modules.QuoteID ORDER BY Quote_Modules.ModuleID;

    Read the article

  • Why would 1.000 subforms in a db be a bad idea?

    - by KlaymenDK
    Warm-up I'm trying to come up with a good way to implement customized document forms. It's for a tool to request access to applications; each application will want to ask its own specific questions. The thing is, we have one kind of (common) user who needs to fill in and submit documents based on templates, and another kind of (super) user who needs to be able to define what each template needs to contain. One implementation option would be to use a form (with the basic mandatory stuff), and have that form dynamically include a subform appropriate to the specific task at hand. The gist of the matter is that we could (=will!) quite easily end up having many hundreds of different subforms! (NB. These subforms will be maintained in an automated manner, but that is another topic that may be considered outside the scope of this Question.) Question It's common knowledge that having a lot of views in a Notes database is Bad Thing. But has anyone tried pushing the number of forms or subforms and made any experiences regarding performance?

    Read the article

  • MS Access 2003 - Unbound Form uses INSERT statement to save to table; what about subforms?

    - by Justin
    So I have an unbound form that I use to save data to a table on button click. Is there a way I can have subforms for entry that will allow me to save data to the table within that same button click? Basically I want to add more entry options for the user, and while I know other ways to do it, I am particularly curious about doing it this way (if it can be done). So lets say the 'parent form' is frmMain. And there are two child forms "sub1" and "sub2". Just for example sake lets say on frmMain there are two text boxes: txtTitle & txtAuthor. sub1 and sub2 both have a text Box on them that represent something like prices. The idea is Title & author of a book, and then a price at each store (simplified). So I tried this (because I thought it was worth a shot): Dim db as DAO.database Dim sql as String sql = "INSERT INTO (Title, Author, PriceA, PriceB) VALUES (" if not isnull(me.txtTitle) then sql = sql & """" & me.txtTitle & """," Else sql = sql & " NULL," End If if not IsNull(me.txtAuthor) then sql = sql & " """ & me.txtAuthor & """," else sql = sql & " NULL," end if if not IsNull (forms!sub1.txtPrice) then sql = sql & " """ & forms!sub1.txtPrice & """," else sql = sql & " NULL," end if without finishing the code, i think you may see the GOTCHA i am headed for. I tried this and got an "Access cannot find the form "" ". I think I can pretty much see why on this approach too, because when I click the button that calls the new sub form into the parent form, the values that were just entered are not held/saved as sub1 closes and sub2 opens. I should mention that the idea above is not intended to be a one or the other approach, rather both sub forms used everytime. so this is an example. i want to use this method (if possible) to have about 7 different sub form choices in one form, and be able to save to a table via a SQL statement. I realize that there may be better ways, but I am just wondering if I can get there with this approach out of curiousity. Thanks as always!

    Read the article

  • zend session exception on zend_session::start with forms

    - by Grant Collins
    Hi I'm having issues with trying to use Zend_Form_SubForm and sessions. My controller is in essance acting a wizard showing different subforms depending on the stage of the wizard. Using the example I am planning on storing the forms in a session namespace. My controller looks like this. include 'mylib/Form/addTaskWizardForm.php'; class AddtaskController extends Zend_Controller_Action{ private $config = null; private $log = null; private $subFormSession = null; /** * This function is called and initialises the global variables to this object * which is the configuration details and the logger to write to the log file. */ public function init(){ $this->config = Zend_Registry::getInstance()->get('config'); $this->log = Zend_Registry::getInstance()->get('log'); //set layout $this->_helper->layout->setLayout('no-sidemenus'); //we need to get the subforms and $wizardForms = new addTaskWizardForm(); $this->subFormSession = new Zend_Session_Namespace('addTaskWizardForms'); if(!isset($this->subFormSession->subforms)){ $this->subFormSession->subforms = $wizardForms; } } /** * The Landing page controller for the site. */ public function indexAction(){ $form = $this->subFormSession->subforms->getSubForm('start'); $this->view->form = $form; } However this is causing the application session to crash out with Uncaught exception 'Zend_Session_Exception' with message 'Zend_Session::start() Any idea why this is having issues with the Zend Session?? thanks.

    Read the article

  • MS Access form_current() firing multiple times

    - by Eric G
    I have a form with two subforms (on separate tab pages). It's an MDB project in Access 2003. When it initially opens, Form_Current on the active subform fires once, as it should. But when you move to another record (ie. from the main form), it fires Form_Current on the active subform 4 times. Then subsequent record-moves result in Form_Current firing 2 times. This is a pain, because the subforms have a lot of fields that get moved and/or hidden and so it jumps around for every Form_Current, not to mention being slow. I am opening the form with a filter via DoCmd.OpenForm (actually it sends the filter in via OpenArgs). FilterOn is only set once, in Form_Open on the main form, never in the subforms. Form_Current is not called explicitly anywhere else in the code. When I look at the call stack when Form_Current fires moving the first time, it looks like: my_subform.Form_Current [<Debug Window>] my_subform.Form_Current So it seems like something in Form_Current is triggering another Form_Current event. But only on the first record move. The code in Form_Current is somewhat complex, involving custom classes and event callbacks, but generally does not touch the table data. The only thing I can think might be triggering a Form_Current is that it checks OldValue on form controls - could this be causing it? Or anything else come to mind? Thanks. Eric

    Read the article

  • JSF 2 equivalent of tomahawk subform

    - by digitaljoel
    I have an existing JSF 1.2 app that was a portlet running on glassfish v2. I'm converting it to a webapp running on glassfish v3. The app uses tomahawk subforms in several areas. Tomahawk has not been update for JSF 2, which is what ships with glassfish v3. We would like to update our app to JSF 2. Is there a JSF 2 equivalent to tomahawk's subform? I know one option would be to change all of the subforms to be ajax enabled and use the execute attribute to specify which controls take part in the form submission, but would like to make this as straight across as I can without modifying existing functionality if I can. So, lacking a tomahawk subform substitute, is there any way to specify partial form submission for non ajax events?

    Read the article

  • Zend Framework, Zend_Form_Element how to set custom name?

    - by ikso
    Hello, I have form, where some fields are looks like rows, so I can add/delete them using JS. For example: Field with ID=1 (existing row) <input id="id[1]" type="text" name="id[1]" value="1" /> <input id="name[1]" type="text" name="name[1]" value="100" /> Field with ID=2 (existing row) <input id="name[2]" type="text" name="name[2]" value="200" /> <input id="name[2]" type="text" name="name[2]" value="200" /> new row created by default (to allow add one more row to existing rows) <input id="id[n0]" type="text" name="id[n0]" value="" /> <input id="name[n0]" type="text" name="name[n0]" value="" /> new row created by JS <input id="id[n1]" type="text" name="id[n1]" value="" /> <input id="name[n1]" type="text" name="name[n1]" value="" /> So than we will proceed form, we will know what rows to update and what to add (if index starts with "n" - new, if index is number - existent element). I tried subforms... but do I have to create subform for each field? If I use following code: $subForm = new Zend_Form_SubForm(); $subForm->addElement('Text', 'n0'); $this->addSubForm($subForm, 'pid'); $subForm = new Zend_Form_SubForm(); $subForm->addElement('Text', 'n0'); $this->addSubForm($subForm, 'name'); What is the best way for this? 1) Use subforms? 2) Extend Zend/Form/Decorator/ViewHelper.php to use names like name[nX]? 3) Other solutions? Thanks.

    Read the article

  • Django repeating vars/cache issue?

    - by Mark
    I'm trying to build a better/more powerful form class for Django. It's working well, except for these sub-forms. Actually, it works perfectly right after I re-start apache, but after I refresh the page a few times, my HTML output starts to look like this: <input class="text" type="text" id="pickup_addr-pickup_addr-pickup_addr-id-pickup_addr-venue" value="" name="pickup_addr-pickup_addr-pickup_addr-pickup_addr-venue" /> The pickup_addr- part starts repeating many times. I was looking for loops around the prefix code that might have cause this to happen, but the output isn't even consistent when I refresh the page, so I think something is getting cached somewhere, but I can't even imagine how that's possible. The prefix car should be reset when the class is initialized, no? Unless it's somehow not initializing something? class Form(object): count = 0 def __init__(self, data={}, prefix='', action='', id=None, multiple=False): self.fields = {} self.subforms = {} self.data = {} self.action = action self.id = fnn(id, 'form%d' % Form.count) self.errors = [] self.valid = True if not empty(prefix) and prefix[-1:] not in ('-','_'): prefix += '-' for name, field in inspect.getmembers(self, lambda m: isinstance(m, Field)): if name[:2] == '__': continue field_name = fnn(field.name, name) field.label = fnn(field.label, humanize(field_name)) field.name = field.widget.name = prefix + field_name + ife(multiple, '[]') field.id = field.auto_id = field.widget.id = ife(field.id==None, 'id-') + prefix + fnn(field.id, field_name) + ife(multiple, Form.count) field.errors = [] val = fnn(field.widget.get_value(data), field.default) if isinstance(val, basestring): try: val = field.coerce(field.format(val)) except Exception, err: self.valid = False field.errors.append(escape_html(err)) field.val = self.data[name] = field.widget.val = val for rule in field.rules: rule.fields = self.fields rule.val = field.val rule.name = field.name self.fields[name] = field for name, form in inspect.getmembers(self, lambda m: ispropersubclass(m, Form)): if name[:2] == '__': continue self.subforms[name] = self.__dict__[name] = form(data=data, prefix='%s%s-' % (prefix, name)) Form.count += 1 Let me know if you need more code... I know it's a lot, but I just can't figure out what's causing this!

    Read the article

  • zend form multicheckboxes naming

    - by neziric
    how do i have to nest multicheckboxes so that they are named like this 'foo[]['bar']' . i've used subforms but they give me naming like this 'foo[bar][]'. my code: $sub = new Zend_Form_SubForm('sub'); $wish = new Zend_Form_Element_MultiCheckbox('bar'); $wish ->setMultiOptions($education_direction->getAll()) ->setLabel('Wish') ->setRequired(true); $sub-addElements(array( $wish )); $this-addSubForm($sub, 'foo');

    Read the article

  • MS Access ADP front end and SQL Server back end for field data collection?

    - by Brash Equilibrium
    I am an anthropologist. I am going to the field and will use a netbook to collect survey data. The survey forms will need to allow me to enter data into multiple tables, search tables, allow subforms, and be fast enough to not slow down my interview. I have considered storing the data in a SQL Server Express 2008 R2 server (there will be a lot of data) while using a Microsoft Access data project as a front end. To cut down the number of steps required to collect and store data, I'm considering using the netbook for both data storage and collection (after reading this article about SQL Server on a netbook). My questions are: (1) Is there a simpler solution that is also gratis (gratis because I already have a MS Access license from my workplace, and SQL Server Express is, obviously, free)? (2) Does my idea to store and collect data using the netbook make sense? Thank you.

    Read the article

  • Zend_Form : Adding fields in sub-forms on user's click

    - by anu iyer
    I'm having a zend form - comprised of a number of zend - sub forms, where the user is creating a new question (its a content management system). In one of the subforms, the user can click on a button to add more textfields, like this: [----------] [----------] [click to add more] which should give [----------] [----------] [----------] [click to add more] I'm trying to set a flag in the sub form in question - or set a count on how many times the button has been clicked, to add that many total fields to the subform - but its simply not working. I tried using a static count variable - but the value doesnt get incremented at all. Any thoughts on how to do this in a Zend-subform within a zend form? I'll definitely update if I hit a solution. Thanks!

    Read the article

  • Ms Access Save record in subform

    - by LanguaFlash
    I have a main form with a tab control containing multiple subforms. I need to be sure that the data in a subform is saved when the user switches tabs. The problem is that DoCmd.RunCommand acCmdSaveRecord seems only applies to the current form so it doesn't save the data in the subform. I have tried different events on the subform such as deactivate, OnLostFocus etc but they don't fire until another field somewhere else gets the focus. The ideal solution would seem to be to put something on the OnChange event of the tab control to be sure that all the data is saved. That is my question, how to do I save the record in a subform?

    Read the article

  • .NET Forms Abstraction for WPF, Silverlight, Winforms, WebForms, etc...

    - by tyndall
    Anyone know of a project(s) that seek to abstract form definitions on level higher than WPF, Silverlight, Winforms, WebForms, etc... I'm working on a project where we are fixing up 16 somewhat simple WebForms. But we may convert (and probably will convert to WPF or Silverlight 3 to 4 months from now. I'd rather define these forms once and be done with it. I'm willing to write a small DSL to help define forms, subforms, validation, links, and popups. I'm only looking to solve this for 80% or 90% of the forms. Four are very complicated and I'm willing to hand code these. I guess I'm looking for something like what XUL had hoped to be.

    Read the article

  • Changing the way widgets are rendered/displayed in a form on the template

    - by user334017
    I have a form with a few other embedded forms and some various widgets. The widgets are all saved in an array $form['elements'] and for some of them, I want to display labels and things, but for others I only want to display the basic rendering. foreach($form['elements'] as $elem) echo $elem->render(); this displays everything about the widget. The way it is right now, I couldn't for example call $elem['..'] because the different subforms appear in a random order and have different variable names. I assume I could still put some checks in the template, but it seems easier to fix this in the widget class, like override one of the render functions or something. How would I go about doing this or do you have any links that could help me understand how do do this? on a side note, one of my widgets is the sfWidgetFormChoice and I have no clue where it actually renders or how renderer_classes work

    Read the article

  • MS Access 2003: Can data disappear from records and how do I test for this and prevent it?

    - by user328960
    Problem and about the database: Data from a record in Access 2003 database has disappeared. This database has 1 backend and 3 frontends, multiple users and is hosted on Citrix. Within this database, we have records of all clients served, ranging in the 1000s. Background info: The form for client data entry is set up with various subforms, including both a "programs enrolled" subform and a "services" subform. A client can be enrolled in multiple programs. Once enrolled in a program, services can be entered for that program area using the services subform. There are multiple fields in the services subform, one of which is a drop-down field allowing you to choose from the programs a client has been enrolled in (the list is updated for that client whenever he is enrolled in a new program). The problem details: For one specific record and one specific program area, the program has disappeared from the "programs enrolled" subform and all of the related services have disappeared from the "services" subform for a period of 3 months of data entry. However, other programs and services for this record did not disappear. Questions: Is the disappearance of data a common Access 2003 problem? Are there tests in place that can be run to see if data is disappearing and catch that data? If so, what are they? If there is specific code involved, what is it? What can be done to prevent the disappearing of data (other than using a different database)?

    Read the article

  • Problem retrieving values from Zend_Form_SubForms - no values returned

    - by anu iyer
    I have a Zend_Form that has 4 or more subforms. /** Code Snippet **/ $bigForm = new Zend_Form(); $littleForm1 = new Form_LittleForm1(); $littleForm1->setMethod('post'); $littleForm2 = new Form_LittleForm2(); $littleForm2->setMethod('post'); $bigForm->addSubForm($littleForm1,'littleForm1',0); $bigForm->addSubForm($littleForm2,'littleForm2',0); On clicking the 'submit' button, I'm trying to print out the values entered into the forms, like so: /** Code snippet, currently not validating, just printing **/ if($this-_request-getPost()){ $formData = array(); foreach($bigForm->getSubForms() as $subForm){ $formData = array_merge($formData, $subForm->getValues()); } /* Testing */ echo "<pre>"; print_r($formData); echo "</pre>"; } The end result is that - all the elements in the form do get printed, but the values entered before posting the form don't get printed. Any thoughts are appreciated...I have run around circles working on this! Thanks in advance!

    Read the article

1