Adding record with multiselect using Creator API

Adding record with multiselect using Creator API

Hi,

Is there an issue in adding records with multi select fields using Creator API?

I can add the record if there is one option selected but doesn't allow me when there are multiple options selected.

This is part of my PHP code

            $opts = explode("##", $form_data->contractorOptChk);
            $this->XMLString .= "<field name='fieldname'>";
            $this->XMLString .= "<options >";
            for ($j = 0; $j < count($opts); $j++) {
                $this->XMLString .= "<option>" . $opts[$j] . "</option>";
            }
            $this->XMLString .= "</options>";
            $this->XMLString .= "</field>";

Regards
Umar