Checkbox with dataprovider of null should fire onAction?

If I add a field of type checkbox to a form and assign the dataprovider as null, should the onAction event fire when the checkbox is checked/unchecked or not? If not, why not?

It is not implemented to fire the onAction event when it has no data provider. This can be changed easily, but would it be helpful?
How would you know if the state is checked/unchecked? Or are you only interested in the fact that it changed?

it would be quite helpful for me, and personally I am only interested in the fact that it changed. Thanks

jbader:
If I add a field of type checkbox to a form and assign the dataprovider as null, should the onAction event fire when the checkbox is checked/unchecked or not? If not, why not?

I guess you need this to be used as a sort of selector, if so, why don’t you simply use a form variable for this?

why don’t you simply use a form variable for this?

I am creating this form and these checkboxes via the SM, which I am just now getting familiar with. I don’t necessarily know how many checkboxes/vars I would need up front, but if it is possible to programatically create a form variable via SM, then that would work OK for me for this task as I could create each checkbox and then create a corresponding form var. Although at a more fundamental level I think it would make sense to implement onAction for checkboxes with a dp of null.

So can I script the creation and assignment of vars with SM (that would be pretty fancy)?

jbader:
So can I script the creation and assignment of vars with SM (that would be pretty fancy)?

Yes, you can. Take a look at JSForm.newFormVariable()

Wow…that is really pretty impressive. ;-)