No announcement yet.
  • Filter
  • Time
Clear All
new posts

    Can Binary FormItems Have canEdit Set to False?


    We have a DynamicForm with one field that is type binary and used to upload a file. The upload works as expected. The issue we have is that they form is to be disabled until the user selects a 'New' button, which then enables the form with form.setCanEdit(true). This throws an error this.canvas.items is undefined in the devConsole and the form will not become enabled. If I simply remove the binary field from the form's field list then everything works fine, so its that field that is causing problems.

    Rather than creating a test case from scratch, I went to your showcase example to see if the same would happen there. It is experiencing the same problem. The showcase link I'm modifying is:

    I have attached the modified JS which just defaults the form with canEdit as false and then calls form.setCanEdit(true) when pressing the upload button. You'll see that the ID field becomes editable while the binary field does not. Is this expected behavior or am I doing something wrong?

    Please let me know if you need anything else from me.


    Attached Files

    After more experimenting, the binary field will become enabled if you call setCanEdit(true) on the formitem itself rather than the entire DynamicForm.


      We're not seeing a crash in the devConsole - but we do see the failure to enable a FileItem when setCanEdit() is called on it's form, rather than the item itself.

      You didn't mention your version, but we've added a fix to 12.1 and 13.0 which you can try out in builds dated March 6 and later.
      Last edited by Isomorphic; 5 Mar 2021, 03:11.