Textbox quirk with 3.69

2 posts by 2 authors in: Forums > CMS Builder
Last Post: May 23, 2024   (RSS)

By Dave - May 23, 2024

Hi Jeff, 

Thanks for reporting this, it's a bug in the current version and is fixed in the next beta & release.  

Here's a patch.  In /lib/fields/TextBox.php replace this

        $return = <<<__HTML__
{$this->getPrefix()}
<textarea name='$this->name' class='form-control setAttr-wrap-off' style='$style' id='$this->name' rows='5' cols='50'>$encodedValue</textarea>
{$this->getDescription()}
__HTML__;

with this: 

        $useCodeEditor = !empty($this->fieldSchema['useCodeEditor']);
        $textareaClass = $useCodeEditor ? "form-control setAttr-wrap-off" : "form-control";
        $return = <<<__HTML__
{$this->getPrefix()}
<textarea name='$this->name' class='$textareaClass' style='$style' id='$this->name' rows='5' cols='50'>$encodedValue</textarea>
{$this->getDescription()}
__HTML__;

Or just remove "setAttr-wrap-off" if you're not using the new textbox option to display as a code editor.

Let me know if that works for you.

Dave Edis - Senior Developer
interactivetools.com