Forum


Replies: 1   Views: 49
Add structuredtag of type text

Posted by aventyret  · 03-12-2024 - 10:17

If you just add 'text' in this function in CreateDocx.php:
 

public function addStructuredDocumentTag($type, $options = array())
{
    $options = self::setRTLOptions($options);
    $sdtTypes = array('checkbox', 'comboBox', 'date', 'dropDownList', 'richText', 'text');

and then in CreateStructuredDocumentTag.php
 

if (isset($args[0]) && $args[0] == 'text') {
    if (isset($args[1]['placeholderText']) && !empty(isset($args[1]['placeholderText']))) {
        $sdtPr .= '<w:showingPlcHdr/>';
    }
    $sdtPr .= '<w:text />';
}

It's possible to add simple text inputs instead of only richText, and then tabbing between inputs will work fine.