Display text area from another form?

Display text area from another form?

Postby mobilemcclintic » Fri Jun 09, 2017 6:51 am

Hello,
Is it possible in some way to display a text area from a different form on another edit form?
For example, I have:
Quote Header (text area on this form)
-- Quote Item (display above text area here)
-- Item Details

If I do a display object type, i can change the css properties to make the text object taller, but I can't get word wrap to work, so the text is vertically centered and gets cut off at the end of the box.
mobilemcclintic
 
Posts: 54
Joined: Fri Oct 23, 2015 8:04 am

Re: Display text area from another form?

Postby mobilemcclintic » Fri Jul 07, 2017 2:25 am

I don't know if all the code is necessary, but for anybody else that wonders, here is how I solved my issue:
On edit form that displays data from parent form:
On object that I want to display (in my case slscustqareq), choose type of Display, and put code in display tab to retrieve the information.
In Custom Code for the form, add

var input = document.getElementById('slscustqareq'),
textarea = document.createElement('textarea');
textarea.id = input.id;
textarea.cols = 40;
textarea.rows = 5;
textarea.value = input.value;
textarea.name = input.name;
textarea.className += " nuReadOnly";
input.parentNode.replaceChild(textarea, input);


What I end up with is a read only display object that wraps text and is resizable like a text area.
mobilemcclintic
 
Posts: 54
Joined: Fri Oct 23, 2015 8:04 am


Return to General