I have a multi-page form, using a vertical tabs UI, in redux-form, and I'd like to track the current tab selection in the redux-form store.
What's the best way of doing this?
I would track the current tab selection outside of redux-form, but I've integrated redux-form with redux-undo, and I'd really like for undoing a form change to go back to the tab of the modified control.
I tried using a selected redux-form field, but this means that changing the selected tab marks the form as dirty.
From reading the docs, I could probably use reducer.plugin to add arbitrary properties to the redux-form store, but I don't see any documentation of which arbitrary property names are "safe," and I'd have to update the plugin for every form that should behave this way.
Any ideas?
Related
This should be a really simple thing that for some reason I can get to work.
I have an MS Word document which has a drop-down field. If I double-click it - a dialog comes up to add or remove things from the drop-down field.
I just need to be able to get out of this mode so that the drop-down field behaves like it should from a user's point-of-view rather than from a design point-of-view. Basically I just need it to display the items rather than a dialog to allow me to add and remove the items.
According to what I've read, it looks like I should be able to do this by going to Developer, and then toggling the Design Mode button. This doesn't work; whether the Design Mode button is on or off I still can't get it to just act like a drop-down.
Thanks much
It sounds like you're using a legacy form field dropdown. For those to operate as a dropdown, you must protect the document for forms:
On the Developer tab, click on Restrict Editing. The Restrict Editing task pane opens.
In the task pane, check the box beside Allow only this type of editing in the document.
In the next dropdown, choose Filling in forms.
Click on Yes, Start Enforcing Protection.
Protected forms don't allow text to be edited in protected sections. In those areas, only form fields allow you to enter text. If that's too restrictive, look into Content Controls, which don't require document protection.
I'm using Drupal version 8.6.10 with the default Bartik theme.
I created a new content type called Post and I would the change position of the "Save" and "Preview" buttons of the form used when creating a new Post.
Actually these buttons are shown immediately after the Title as you can see in the following picture:
Instead I want them to be shown at the end of the form.
These are the Post manage display settings:
I don't understand why this doesn't happen with the default content types provided by drupal (Article and Basic Page) but only with the content types I add.
How can I change that?
You probably disabled the title position at some point and then re-enabled it without consideration for the position. The 'Manage display' setting you mentioned does not handle the positioning of the form element, it is meant for when you view content in read mode.
To resolve this, go to the 'Manage form display' tab of the specific content type and re-order the position of the title field (e.g. at the top of the field list).
I want to know if there is any way to navigate Dialog components by pressing the Enter Key in the same manner natively implemented by the TAB key?
Though I haven't tried it by handling the keyDown and keyUp events certainly it seems doable. Though you may not be able to intercept the browser produced dialog boxes this way and other dialogs created using Window.alert(). How are you creating the dialogs ?
The tab key is the browser doing the work of changing focus - nothing special needs to be added, you'll find that tab works on any form on the internet (except where explicitly disabled for some reason...).
To move focus with the enter key, you must listen for the onkeydown event (focus change via tab also occurs onkeydown, so selecting this for consistency), check if it was the enter key, and if so, move focus to the next element in the list.
Typical tab focus behavior involves the browser checking the tabIndex of the elements on the page, and finding the next element on the page with a higher tabIndex, or the nearest subsequent sibling/cousin element. I don't have a method to implement this easily, so instead I'm going to focus on just going to the next widget.
GXT 3's FormPanelHelper has some handy methods to look for all Fields - this code could be used as a basis for non-GXT fields as well. Track all FocusEvent and BlurEvent from the fields found in the dialog, and use that to always track the currently focused field. Add a key handler to the dialog itself, to capture all key events, and check if one is the enter key. If so, figure out what the next field is from the currently focused field, and invoke .focus() on it - this will trigger the focus handler described above, so your bookkeeping will be updated correctly.
And as #eliran-m noted, consider leaving the tab key alone - don't get in the way of users navigating the way they are used to. Adding new functionality might be a good thing, but taking away expected behavior probably isn't.
I'm using a RadGrid for changing record status's. Users have the ability to select a status from a dropdown and update that record with that status. Depending on the status chosen, when the user clicks update I want to popup an additional form so the user can fill out more data required for the update. I'm not sure the best way to go about implementing this. Any suggestions are appreciated.
One way is to use the RadWindow like a modal and pop it up to the user via client-side JavaScript. We use RadWindows in our applications and it works. Or, the RadWindow supports a Nested Grid or View that you can have as a record's child; so you can have the master record, click on the arrow on the left and expand the record to view a nested grid of data, or a custom view (via the NestedViewTemplate property). You can also have the form in a DIV, hide it, then show it via JavaScript too.
Those are two ways.
HTH.
I'm scratching my head whether this idea is worth exploring:
I'd like to use a tab control to filter a subform field by the value of the tab control page. There are about 5 different values for that field, so it would be neat to have 5 tabs where you click on the tab and see the list of just those matching records.
I'm a bit of an Access 2007 neophyte (haven't designed a DB with Access in years), so these are the problems that need to be solved with this approach.
Is it possible to have the same subform show on every Tab control page?
What's the most efficient way to link the value of the tab to the subform query?
I realize the brain-dead way to do this is simply create a separate subform for each page, but this seems rather inefficient. Or is it?
If you're filtering the same data, you don't need five copies of the subform, you just need to trigger a change of the Recordsource of the subform or apply a filter to it.
There are two approaches I'd consider:
use a tab, but use it just as a tab strip, with the subform not embedded on any page of the form, but below it. In the tab's OnChange event, filter the subform appropriately.
use an option group with toggle buttons and in the AfterUpdate event, filter the subform. This will look just like the tab control with the Style property set to Buttons.