As suggested in this comment from @colemanw:
https://github.com/civicrm/civicrm-core/pull/28388#issuecomment-
1835717428
Note: This will also turn a prop of `columns` into `cols` for the key not just for a `note_columns` prop.
if ($inputType == 'TextArea') {
foreach (['rows', 'cols', 'note_rows', 'note_columns'] as $prop) {
if (!empty($data[$prop])) {
- $inputAttrs[str_replace('note_', '', $prop)] = (int) $data[$prop];
+ $key = str_replace('note_', '', $prop);
+ $key = str_replace('columns', 'cols', $key); // per @colemanw https://github.com/civicrm/civicrm-core/pull/28388#issuecomment-1835717428
+ $inputAttrs[$key] = (int) $data[$prop];
}
}
}
-<textarea class="crm-form-textarea" id="{{:: fieldId }}" rows="{{:: $ctrl.defn.input_attrs.rows || 4 }}" cols="{{:: $ctrl.defn.input_attrs.columns || 60 }}" ng-required="$ctrl.defn.required" ng-model="getSetValue" ng-model-options="{getterSetter: true}" ></textarea>
+<textarea class="crm-form-textarea" id="{{:: fieldId }}" rows="{{:: $ctrl.defn.input_attrs.rows || 4 }}" cols="{{:: $ctrl.defn.input_attrs.cols || 60 }}" ng-required="$ctrl.defn.required" ng-model="getSetValue" ng-model-options="{getterSetter: true}" ></textarea>