1
0
-1

Can anyone tell me how I can render a button on a form only when the form is in preview mode and not run time?

    CommentAdd your comment...

    2 answers

    1.  
      1
      0
      -1

      I think this should work

       

      var objLib = Resource.getFormView();
      if(objLib.isPreview==true){
      console.log("In preview mode")
      }else{
      console.log("Not preview mode")
      }

        CommentAdd your comment...
      1.  
        1
        0
        -1

        You can use the "Resource.preview" boolean value in a visibility rule

        1. Diana Pattenden

          Hi David Foster this didn't work for me? I couldn't see the button in preview mode ..

        2. David Foster

          Hi Diana Pattenden, are you able to post your visibility rule?

        3. Diana Pattenden

          Hi David Foster I literally just wrote Resource.preview in the visibility rule

        CommentAdd your comment...