I have banged my head against the wall about wanting a TEXTAREA for the web, but always had to do the multi-value text field with a NewLine separator and then give the field HTML attributes to size it (rows and columns).
This is THE solution and how wonderful it is, if I can just explain it properly.
This is for anybody who wants a TEXTAREA for single value text fieldâŚ
Take this and put it as pass-thru HTML:
In this case, I have a plain text field called âProbabilityJustâ and it is hidden from the browser. This TEXTAREA is the input field for this field.
The value for ComputedValue is the name of the plain text field, in my case âProbabilityJustâ.
The rest is jibberish you may or may not need, but Iâll explain it anyway - and this works in both Firefox and IE.
I have a computed for display field on the form - âbrowserTypeâ whose value is @BrowserInfo( âBrowserTypeâ ). This enables me to code things to work in different browsers because we know that they donât play nice together!
I have a css class to define how I want the TEXTAREA to look and then I have the onKeyPress event coded to not allow the user to enter a RETURN - I noticed it wrote a special character to the text field. (The onKeyPress is written to work in both Firefox and IE.) Then I have an onChange event that writes the value back to the hidden field, so it is always current and up to date.
It refreshes beautifully and maintains the value in the front-end and back-end when saved.
I hope this will help some of you out there as it has been a wonderful help to me to finally get rid of some multi-value fields I had just I could display them as TEXTAREA.
Sincerely,
Debbie