Zum Hauptinhalt gehen

Allow some form items to run javascript methods?

Kommentare

2 Kommentare

  • Permanently deleted user
    I discussed this with our viewer team lead, and yes, we do currently disallow embedded JavaScript on the forms. The problem on the viewer's end is that it has no way to differentiate scripts introduced by the administrator from scripts that may have been introduced at runtime (e.g., by a user). Because it can't tell "safe" scripts from potentially harmful ones, it will disable any script before displaying it.

     

    What are you looking to do in your forms dynamically?
    0
  • Marc Rempel
    Hi Jordan,

     

    Thanks for the follow-up. 

     

    The kind of intereaction I was looking for was to toggle map layers, zoom to an area of interest and have a popup display in an output report view along these lines.

     

    User-added image

     

    I was able to find a work around solution by creating a custom form by calling a dynamic external activity in a workflow that gets handled by a custom module added to the viewer that takes the inputs and returns the outputs in the workflow with the embedded javascript calls which are essentially just calling other workflows to run when clicked.  This works, though it requires creating a custom module to add to the viewer to match the workflow activity.

     

    It would be preferable to keep it all within the workflow vs having to match a custom module in the viewer with a dynamic external activity in the workflow.  Conversely, the custom module approach does provide for better tooling in the display and logic side of things versus hard coding in strings with javascript calls.  In an ideal world there would be a workflow activity that lets you create a custom output, wouldn't need to be a form, with dynamic results from workflow analysis and integrated embedding of possible commands to run based on those results.

     

    Regards,

     

    Marc

     

     

     
    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.