hschottm / survey_ce

Contao extension to create questionnaires and run online surveys
Other
6 stars 20 forks source link

openended_maxlen wird nicht gesetzt #3

Closed Defcon0 closed 9 years ago

Defcon0 commented 10 years ago

Hallo,

das Attribut openended_maxlen wird für FormOpenEndedQuestion-Instanzen nicht gesetzt. Die entsprechende Änderung wäre:

protected function setData_oe_singleline($varValue) { if (strlen($varValue['openended_width'])) $this->arrAttributes["size"] = specialchars($varValue['openended_width']); if (strlen($varValue['openended_textinside'])) $this->arrAttributes["value"] = specialchars($varValue['openended_textinside']); if (strlen($this->varValue)) $this->arrAttributes["value"] = specialchars($this->varValue); }

wird in der Klasse FormOpenEndedQuestion ersetzt durch

protected function setData_oe_singleline($varValue) { if (strlen($varValue['openended_width'])) $this->arrAttributes["size"] = specialchars($varValue['openended_width']); if (strlen($varValue['openended_maxlen'])) $this->arrAttributes["maxlength"] = specialchars($varValue['openended_maxlen']); if (strlen($varValue['openended_textinside'])) $this->arrAttributes["value"] = specialchars($varValue['openended_textinside']); if (strlen($this->varValue)) $this->arrAttributes["value"] = specialchars($this->varValue); }

Es wäre klasse, wenn diese Änderung eingebaut würde.

Ciao

hschottm commented 9 years ago

Fixed with commit 80f8965