Reputation: 153
How do you check a Rich Text field on an xpage if it has text in it for validation? need this in ssjs.
Thought maybe i could do a getComponent or something, or document1.getItemValue, then check off of that
Upvotes: 1
Views: 1213
Reputation: 8465
getComponent("inputRichText1").getValue();
will work if you want to get any value currently held by the control (after any converters etc.)
getComponent("inputRichText1").getSubmittedValue();
Will get the value that has been posted to the server before any converters have been applied to it.
Upvotes: 1
Reputation: 20384
Add a validator to the control and simply use the 'value' ssjs variable which would contain the submitted html. Outside a validator use getComponent('body1').getSubmittedValue()
Upvotes: 0