How to access a freeform field object's properties from an event I am trying to get the value of a field from a freeform event.  Specifically I'm trying to see if a particular checkbox is in a form submission.

craft()-&gt;on(
    "freeform_submissions.onBeforeSave",
    function (Event $event) {
        $submission = $event-&gt;params["model"];
        $field = $submission['fieldMetadata']['checkbox_handle'];


This works to this point.  I see if I do Craft:dd($field); I have a checkboxField object. But from here on I can't get any info about that field.

        $id = $field-&gt;id; // or:
        $handle = $field-&gt;handle; // and any other properties


This throws: Fatal error: Cannot access protected property Solspace\Freeform\Library\Composer\Components\Fields\CheckboxField::$id.

If I try:

        $id = $field['id'];


I get: Fatal error: Cannot use object of type Solspace\Freeform\Library\Composer\Components\Fields\CheckboxField as array

The properties and methods are listed at: https://solspace.com/craft/freeform/docs/field/, but I can't access the properties.  I can call the render() method which works and that outputs html.  I'm sure its something obvious, but I'm missing it.
To answer my own question, this is what I found.
The answer is to use get... methods.

craft()-&gt;on(
    "freeform_submissions.onBeforeSave",
    function (Event $event) {
        $submission = $event-&gt;params["model"];
        $field_item = $submission-&gt;fieldMetadata['field_handle'];
        $field_value = $field_item-&gt;getValue();

    }
);


The $field_item-&gt;getValue() can be $field_item-&gt;getId() or $field_item-&gt;getHandle() and so on.

The properties listed here: https://solspace.com/craft/freeform/docs/field/ can be used by turning the property into a method and prepending get.