Setting field to required not working

Hi,

I'm trying to set a several fields to required but it doesn't seem to work.
I can still change and save a record when these fields are not entered.
I'm using the following code:

fd.spRendered(function(){
fd.field('OrderNumber').required = true;
fd.field('Category').required = true;
fd.field('Hub').required = true;
fd.field('Value').required = true;
});

Hello @Pieter,

The code should work. Please check the browser console for the errors and share the screenshot. Probably there are other lines of the code that breaks the logic.

Hello,

It mentions undefined properties:

@Pieter,

Please make sure that you are using the field's internal names in the code:
image

Hi,

Wow, that was a pretty dumb mistake from my site. With the internal name it works.
Thanks...

1 Like