Forum Discussion

marcus's avatar
marcus
Ideator III
9 years ago

How to open non-modal window with custom form?

Hi, I'm using the following code in a javascript method to open a custom form via an action:
var fetchForm = this.getInnovator().newItem("Form","get");
fetchForm.setProperty("name","myForm");
var formId = fetchForm.apply("get").getID(); 

// set form params
var param = { 
    title  : "MyCustomForm",
    formId : formId,
    aras   : top.aras,
    partId : this.getID()
};

top.aras.modalDialogHelper.show("DefaultModal", window,  param, options, "ShowFormAsADialog.html");
This works well, but I'd like the window not to be modal. How does one open a non-modal dialog with Aras? (I haven't found any documentation for this part of the Aras Javascript API) We're using 11.0 SP3 at the moment. Cheers, /Marcus

4 Replies

  • eli_donahue's avatar
    eli_donahue
    Community Manager
    Hi Marcus, Can you describe your use case a little more? Are you trying to display an item form, or a custom input form? Eli Aras Labs Software Engineer
  • Hi Eli, It is a custom input form (launched from an action on the 'part' item) which allows the user to define parameters & settings for a custom BOM export server method. In order to determine the right settings, the user sometimes want to look at the part and its sub-parts in Aras, and having the dialog modal is both unnecessary and contra-productive. Cheers, /Marcus
  • eli_donahue's avatar
    eli_donahue
    Community Manager
    Hi Marcus, At this time I don't have a good sample for calling a custom Aras form in a non-modal window, however the Tab Forms community project may meet your requirements.

    ArasLabs/tab-forms

    tab-forms - Demonstrates how to display a custom form in a relationship tab.

    Using the Tab Forms project as an example,  you could display your custom form in a tab on the Part itself. Users could click this "Export  BOM" tab, enter their parameters, and navigate to other parts of Aras without losing their input. You can then use the form's contents in your server method, as planned. Hope this helps! Eli
    Eli Donahue Aras Labs Software Engineer
  • Hello I am trying to open “form”of “item type” in another relationship item type through action. with the reference to above code But when I am trying below code it gives error. Error: aras_object: "undefined": "undefined" Client side error. Here is my code var Rid = this.getUserID(); var fetchForm = this.getInnovator().newItem("Form","get"); fetchForm.setProperty("name",""); var formId = fetchForm.apply("get").getID(); alert (formId); // set form params var param = { title : "R_abc", formId : formId, aras : top.aras, partId : this.getID() }; top.aras.modalDialogHelper.show("DefaultModal", window, param, options, "ShowFormAsADialog.html"); return this; Please help me.