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.
Welcome to the nuBuilder forums!
Please register and login to view forums and other content only available to registered users.
Please register and login to view forums and other content only available to registered users.
Display text area from another form?
-
- Posts: 54
- Joined: Fri Oct 23, 2015 12:34 am
-
- Posts: 54
- Joined: Fri Oct 23, 2015 12:34 am
Re: Display text area from another form?
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.
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.