I have tried the approach like this :
$item = new WordFragment($docx); $content1 = new WordFragment($docx); $content2 = new WordFragment($docx); $content1->addText('1.1', ['font' => 'Arial', 'fontSize' => 8, 'indent_left' => 10]); $content2->addFormElement('select', ['selectOptions' => [' 0 ', ' 1 ', ' 2 ', ' 3 ']]); $content = array(); $content[] = $content1; $content[] = $content2; $item->addText($content);
But the text and the form element are still not in the same line. Is there anything wrong with the code?