What is the proper way to clear a dashboard form? Just send an empty array payload like for a table?

What is the proper way to clear a dashboard from? Just send an empty array payload like for a table?

msg.payload = [ ] for example?

Do you mean a Form?

Useful information here - How To Initial Form UI - #10 by dceejay

You would feed a object of null values for each payload property of the form.
e.g.

{"test1":null,"test2":null,"test3":null}

If the last form item is required it will show red.

Yes a form not a 'from' of course. So you can't clear an entire form? You have to explicitly set each field to null, blank, whatever? Interesting. And yet, when you click the submit button, the form is cleared of course, it is such behavior I wanted to mimic. Maybe easier to just send message the cancel button initially to ensure the form is in a known state.

You can do it with some custom front-end javascript:

const { myForm } = document.forms;
myForm.reset();

Ah! That is closer to what I was looking for! Slick. Thanks,

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.