I'm facing an issue with Calculated values.
I have a control where the formula is set to a Multi-line textbox (RTF) named on my form.
There's history here, but basically the textbox will be hidden when the form is LIVE but for now I'm showing it here for demonstration purposes.
When I View the form, everything in the calculated value control (on the left) renders perfectly, as expected with line breaks etc.
However, when putting the form into edit mode, the calculated value loses all the line breaks, seemingly ignoring the HTML <br> in the multi line text box (on the right).
Thanks in advance anyone who can help.
Since the text value you are referencing is hidden on the form design, I assume then it will be stored in a list column, If that is the case you should be able to use a label control to display the html value of the multiline text without using a calculated control, Calculated controls are better for data that is manipulated in form context.
If this doesn't fit you use case please let me know.
see below a screenshot of a version using the label instead of calculated value.
@greenawayr correct me if I'm wrong.....you're trying to display the value of your MLT on the form but don't want users to make any changes, correct?
If that's the case, can you add your MLT control on the form and then go into its settings. Under Advanced, go to Control Mode and change it to Display Mode.
You are absolutely right in this, however I need to explain a bit more about the solution, to explain why I cannot use this approach.
As you can see, I've tried several different paths before arriving at this approach, which is still flawed, so I'll just keep going.
Happy to take any suggestions to make this work.
Thanks for the suggestion, however I cannot see any way of referencing the list column in a label. Is this because the form is being created against a Content Type (in a content type hub) rather than in a list?
So my approach of having the MLT hidden so it can be written to successfully, and then having the Calculated Value control show the MLT contents would appear to be the way forward, if the Calculated value rendered consistently in the same way the MLT does.
@greenawayr Control mode --> Display will force the control to be in the display mode and if you also select yes for resize at runtime then your problem will be solved. No one will able to edit the data from the form.