spModal WidgetInput not working?

lucr
Kilo Expert

Hi Everyone,

Quick question. I'm working on a set of Service Portal widgets. And I want to open a widget within a modal as popup.

function(spModal) {

  /* widget controller */

  var c = this;

  c.onAction = function(title, action) {

  // ask the user for a string

  // note embedded html in message

  spModal.open({

  title: title,

  widget: 'drdc-action-modal',

  widgetInput: {

  action: action,

  environment: 'asdfasdfsafd'

  }

  }).then(function(){

  console.log('widget dismissed');

  })  

  }

}

So this is the quick and dirty code. Copied from the github help pages.

The popup/modal opens just fine however the options are not passed through to widget. If i dump the complete options it just outputs:

{"sp_widget_dv":"","sp_column_dv":"","active":false,"sys_tags":"","order":-1}

Do you guys no what i'm doing wrong?

Thnx in advance!

Maybe there is some other feature not using spModal?

Kind regards,

Luc

6 REPLIES 6

Skylar2
Kilo Contributor

Hey, I can't see my server side logs (sp.log / console.log) either ... what was the fix for this? Found this article by way of my default search engine as well.

WadeSmy
Tera Contributor

Adding for other who have struggled with us...
For whatever reason it just doesn't show up in console.log. Switch to gs.info and check the script log in platform.