Page 1 of 1

Mandatory related item

Posted: 06 Jan 2017
by Katy
Hi , I couldn't find any information about that: is there any way to make a related item mandatory. Let's say: if the user checked the box then he should incert at least one related item.

Re: Mandatory related item

Posted: 08 Jan 2017
by Dmitry Kozlov
Hi Katy,

You can check if the related items is empty via JavaScript before the submission in the 'onsubmit' handler:

if (fd.relatedItems(0).data('ctx').ListData.Row.length > 0) {...}

Re: Mandatory related item

Posted: 09 Jan 2017
by Katy
Thanks! works great!