It is possible to make paragraph control text dynamic by substituting parts of the text with data values from fields that have bindings.
The approach below will allow for many different types of fields to be used, including those that are formatted e.g. radio, drop-down lists, dates and amounts.
It will also allow the text to be formatted using the standard paragraph control behaviour e.g. bold and underline the dynamic values.
The steps required are as follows:
The approach below will allow for many different types of fields to be used, including those that are formatted e.g. radio, drop-down lists, dates and amounts.
It will also allow the text to be formatted using the standard paragraph control behaviour e.g. bold and underline the dynamic values.
The steps required are as follows:
- Add a Paragraph control with the static text required.[/*]
- Click on the HTML icon (Edit HTML Source).[/*]
- Type in the following text where you want the dynamic data value: <span id="para_text_1">*TEXT TO REPLACE 1*</span>
The id must be a unique value on the page. The text in the span is a placeholder that can be left blank if required. [/*] - Make sure you scroll down and click the UPDATE button to commit the change in the Paragraph text embedded editor.[/*]
- Add a hidden field to the page and set the binding to the dynamic data value required.
In this example the hidden field would be: hidden_field_1 [/*] - Add an "onload" event for the page with the following "custom script": dojo.byId("para_text_1").innerHTML = hyf.util.getFieldValue("hidden_field_1",true);
This onload event will replace the text within the span embedded in the paragraph control.
You can use onbeforeload if the control does not require any script based formatting such as dates, currency amounts, etc.[/*]
RE: Paragraph control - using dynamic values in the text
RE: Paragraph control - using dynamic values in the text
Is it possibly related to the last line of text in the description above?
If not it would be worth getting some further details about the app.
However, there is no problem using onbeforeload, and its probably safer.