Nested getcmsfields_forpopup showing in same popup in silverstripe - silverstripe

I have form in getcmsfields_forpopup for backend(admin panel) in silverstrip. In that form, I have added nested dataobjectmanager field to enter multiple dates(has_many relation). When main form open in popup window and I click on add date link, then second popup form open in the same window not in separate one. That means after entering date data and saving it, when I click on close button, whole form is closed rather going back to main form. Please help in this regard.

This can't be done using SilverStripe's default popup form unless, maybe, you extended the DataObject Manager field and had it render itself in an iFrame.
The best option would be to manage your parent DataObjects with DataObjectManger as well. DataObjectManager supports nested DataObjectManager fields. See this tutorial "Nested DataObjectManager" (on YouTube).

If you're able, can I suggest that you try out SilverStripe 3.0? The support for this kind of thing is much better in SilverStripe 3.0 than it is in 2.4.

Related

Use Page Items in a Button Link in Apex Express

i have a little problem. I'm using Oracle Applicarion Express and i'm trying to use some page items in a Link created for a button. I created the Button as region button, and selected in the region" Action when button clicked" "Redirect to URL". In this URL i want to use two pageitems. I tried already to use them mit ":PAGE_ITEM" or "&PAGE_ITEM." but non way works. Can someone help me please?
What does the resulting hyperlink look like? The chance is great that it looks like
f?p=<app_id>:10:<session id>::::P10_ITEM1,P10_ITEM2:,
This is because when using the substitution syntax like &PAGE_ITEM. will put the session state of the referenced item in the string. Since the button is rendered during the loading of the page it will use the session state of the item at that time.
When you then fill in a value for PAGE_ITEM, this will not change the session state of that item - and even if it did it would not matter since the button was already rendered.
If this is the case then you'd better have the button submit the page, and define an on submit before validations/computations branch to act on that button. In the branch you can then safely use the session state of the required items.

Add filter to Add existing button crm 2011

I followed the instructions in this link
but I face a strange problem which is when the lookup is populated with the new filtered view the add button is getting disabled when I select a record from the new view !!
I debugged the code in the lookupinfo.aspx page and I found this line of code that controls whether the add button is enabled or disabled
btnAdd.disabled = (crmGrid.InnerGrid.SelectedRecords.length == 0);
and this line of code always return true despite there is a selected record !!
Can anyone help me ?
Thank you.
I followed the instructions in this link
Which link? I can't see one referenced in your question. I'll make some assumptions about what you are trying to do. I will assume that you are trying to hide an "Add Existing" button linked to a form's sub-grid. I'll also assuem you're trying to edit XML files by hand (which is the hard way!).
The easiest way to apply rules to buttons in CRM 2011 is to use Erik Pool's brilliant tool "Visual Ribbon Editor" (available here)).
To hide an "Add Existing" button based on selected records, you would:
Connect the tool to your CRM environment
Open the "parent" entity (i.e. the record type that shows the "Add Existing xxxx" button
Select the Ribbon Type to be "Sub-Grid"
Select the button you wish to manipulate
Add or edit the Enable Rules for that button
If I'm not describing a solution to your problem, maybe enhance your question - it's hard to understand what you are trying to acheive.

Forms as modal windows

i got a form and i want to show it as window dialog and able to submit it via dialog
how i do that? what module i need?
also, how can i make that i get unique class for each form element?
The Popups module is awesome for this.
You can easily target a page (with your form), and it puts the content of the page in the popup. It opens it similarly to a lightbox, but it does not open a new browser window.
Drupal has a module for modals.
As for the unique class names in your form, this article may be helpful.

Disable Ribbon Button

I want to disable and NOT hide a ribbon button (specifically Ribbon.ListItem.New.NewListItem) on a particular List type. On web I could find a lot many posts showing me ways to remove/hide buttons but none really worthwhile which could tell me how can I just disable an alrteady existing sharepoint button in my custom List type.
e.g. Following code does remove the button instead of hiding.
Id="RemoveRibbonButton"
RegistrationType="List"
RegistrationId="213908"
Location="CommandUI.Ribbon">
This can be done through Javascript on the client side. Check out this article for an example.
http://makarandrkulkarni.blogspot.com/2010/01/sharepoint-2010-ribbon-customization_23.html

DRUPAL: customize dropdown Views filter

I'm using Views dropdown filter (with tags) and it works great. However I would like to customize it in this way:
1 - remove button "Apply" and automatically update Views (at the moment I'm updating it with Ajax)
2- allow my customer to change the order of the dropdown items (specifying top items)
3- select multiple items without having to press the SHIFT button on keyboard (do not unselect other items if new items are selected)
http://dl.dropbox.com/u/72686/viewsFilter1.png
Let's suppose the items in the image are tags... something like this:
http://dl.dropbox.com/u/72686/viewsFilter2.png
thanks
Use jQuery to .hide() the Apply button, and then set a handler on the filter fields so that whenever one of them is changed (i.e., by the user), the Apply button registers a click.
Hmm, can't help with this one. You might be stuck writing a custom module that hooks into the Views API.
Sounds like the Sexy Exposed module would solve this problem?
I'm using the following code to keep the items selected and it works.
$('#edit-tid option').click(function() {
$(this).toggleClass("selected");
$("option:not(.selected)").removeAttr("selected");
$("option.selected").attr("selected", "selected");
//submit request
$('#edit-submit-Portfolio').click();
});
When a request is submitted the page is refreshed. The selected items are still selected (class="selected") but the javascript code do not keep them selected.. I don't understand why, since they have the correct class attribute.
So.. it doesn't work after refresh, even if the html code is the same (the same class="selected" attribute is assigned to the same items).
thanks
I've solved point 1 and 2, installing better exposed filter module from drupal website.

Resources