The CreatorCon Call for Content is officially open! Get started here.

Additional Comments Validation when 'Post' Button is Clicked

akshaysood
Tera Contributor

Hi All,

I needed help in one of the requirement.

I want to create a validation on the additional comments fields i.e. it should be more than 3 characters, I have created an onSubmit client and it works when I update/save the form.

However this does not work when I click the 'Post' button beside the Additional Comments field, could you help me with a way out.

Thanks for your help in advance!! 

6 REPLIES 6

Hristo Ivanov
Kilo Sage
Kilo Sage

The Post button operates differently than the form submission process. The Post button appends the comment asynchronously without submitting the entire form, so onSubmit client scripts do not run in this context. 

Hi Hristo

I am not able to locate the UI action

Making a change to this would impact everywhere that this button is used

Your best option would probably be to create a BR on the sys_journal_field that checks on insert if the desired text is present. However, I haven't tested this, so I cannot confirm if it will work.