Skip to main content
Robin Müller
Participating Frequently
Jun 29, 2023 4:55 PM UTC
Question

richValue in Validate

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 is closed to new replies. Start a new post to keep the conversation going.

4 replies

try67
Community Expert
Community Expert
Jun 29, 2023 4:59 PM UTC

To apply a value you should use the Calculate event.

Translate
Robin Müller
Participating Frequently
Jun 29, 2023 5:14 PM UTC

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:

Translate
try67
Community Expert
Community Expert
Jun 29, 2023 5:35 PM UTC

What are you trying to achieve here, exactly?

Translate