Skip to main content
Robin Müller
Participating Frequently
June 29, 2023
Question

richValue in Validate

  • June 29, 2023
  • 1 reply
  • 640 views

Hi,
setting the value does not work in the "Validate" event. I have the field set correctly to richText, but even when I use event.richValue or event.target.richValue, the text still does not appear in the field. On Mouse events event.target.richValue works normally.
Here is my code:

// inputed in Validate
span1 = {text: "Hi, There!"};
event.richValue = [span1];
This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
June 29, 2023

To apply a value you should use the Calculate event.

Robin Müller
Participating Frequently
June 29, 2023

I don't want to use Calculate, I want Validate.

Specifically, it doesn't work to insert a value if the field is empty.

if(event.richValue.length===0){
	span1 = {text: "Hi, There!"};
	event.richValue = [span1]
};

Here is my code:

try67
Community Expert
Community Expert
June 29, 2023

What are you trying to achieve here, exactly?