1 Reply Latest reply on Aug 11, 2014 4:39 PM by paulpicazo

    How to configure a callback javascript function for a EchoSign Widget?

    emdanielsan

      Hello everyone,

      I want to do something technically very simple but I cannot find the way to do that in the documentation.

      I want to configure one of my javascript functions to be a callback for my EchoSign Widget.

      In this way my code will be able to know that the user has signed the document and I can redirect the page to another one.

      Adobe Sign@

      I'm creating the widget via PHP using the official example code as follows:

      <?php
      
          include('../setup.php');
      
          $file = EchoSign\Info\FileInfo::createFromFile($filepath);
          
          $widget = new EchoSign\Info\WidgetCreationInfo('Test personalizeEmbeddedWidget', $file);
          $widget->setMergeFields(new EchoSign\Info\MergeFieldInfo($merge_fields));
          
          try{
              $result = $api->createEmbeddedWidget($widget);
              $js = $result->embeddedWidgetCreationResult->javascript;
          }catch(Exception $e){
              print 'An exception occurred:';
              var_dump($e);
              exit;
          }
          
          print $result->embeddedWidgetCreationResult->javascript;