You are viewing limited content. For full access, please sign in.

Question

Question

Cloud Forms JavaScript Repository Question

asked on October 17, 2022

Using the "Old Designer" in cloud JavaScript does not seem to run on the Thank You page or when saving to repository.  Functionality runs perfect on my on premises system but does not work in cloud.  Even a simple alert does not run on the Thank You page. 

Just trying to get clarification if JavaScript still runs before repository submission and thank you page and if so what has changed so I can continue down that path.

0 0

Replies

replied on October 18, 2022

Can you share the piece of code that works for on premises system but not work for cloud? Did you upload the process download from on premises to cloud and found it no longer work?

0 0
replied on October 31, 2022

Hey, just following up if you had any solutions. 

Thanks,

0 0
replied on November 4, 2022

Currently. it doesn't support executing JavaScript on read-only form due to some security reason. 

1 0
replied on October 18, 2022
$(document).ready(function (){
  // change event is probably better than blur since it covers more
  // scenarios and won't fire when no actual changes were made
  $('#q2 input').change(function(){
    // jQuery equivalent of what you had before
    // $(this) is whatever element triggered the change event
    // so there's no need to use the full selector again
    $('#vName1').html($(this).val());
  });
  
  // check/retrieve the value on load to handle saved form
  // or values that were populated in a previous step/task
  var vName = $('#q2').find('.cf-field :input').val() || $('#q2').find('.cf-field div[type]:eq(0)').html() || '';
  $('#vName1').html(vName);
});
By signing below, I, <span id="vName1"></span>, certify that:

Javascript Code and HTML Code

This works flawlessly on prem but does not work in cloud.  I've even simplified the code to be "var vName = 'Test';" just to set the variable and it does not set either.  I've added "alert(vName)" as well in the code to see if it even alerts in cloud on the Thank You page and it does not (it does alert on the Thank You page on my prem system) so my thought is that scripts do not run in cloud after submit or before repository creation.  When I look at dev tools I do see the script section and I do see the code on both prem and cloud and it looks VERY similar so maybe its just a new nuance idea I'm not aware of.

 

Thanks for the reply and help!

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.