Announcement

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

    CanvasItem: how to detect before save of a form?

    CanvasItem documentation offers the following solution when you can't check for changes in your Canvas:

    "If you cannot easily detect changes to values in your Canvas, a workaround is to call storeValue right before the form saves."

    But how do i do that? Is there an event in CanvasItem?

    #2
    The event you're looking for is the one where you save/submit the form.

    For example, if you click on a Button, you will add the storeValue call in the click function of the button, just before saving the form.

    Comment


      #3
      Hmm, i thought i would be able to build a portable CanvasItem ( without requiring developers to place storeValue on submit ).

      Thanks for the info didierv :)

      Comment


        #4
        It depends on what you put in your CanvasItem, and on what the value is. In my CanvasItems, I have used either SC objects, or custom javascript code in html panes. In both cases, I could use javascript events or SC callbacks to store the value as soon as it was changed.

        Comment

        Working...
        X