In record view in a form - Is there a way to ‘programatically’ precede data read from a column in a SQL table with HTML and BODY tags, then display the actual data, and then to append /BODY and /HTML after the data - in the HTML_AREA pane?
Note: We do NOT want to store the starting and ending HTML and BODY tags within the data but wrap the data content within these tags.
create a label and doubleclick on the text property
fill the text property with %%myField%% and mark the checkbox “use html”
fill the name property with “myLabel”, in order to make it show as an element in the method editor.
check mark the “displays Tags” property of your label.
create your actual textfield and place the label you just created on top of it.
fill the name property with “myField”, in order to make it show as an element in the method editor.
atttach an onAction script to your label that does:
elements.myField.visible = true
elements.myLabel.visible = false
attach an onFocusLost script to your field that does:
elements.myField.visible = false
elements.myLabel.visible = true
note: also make an onShow script on your form that initialises your form making your label visible and your field invisible:
elements.myField.visible = false
elements.myLabel.visible = true
This way your data is separated from the html and is still editable.
IF you want to have complete control over the html you might consider concatenating htmlCode tags with your field.