Mandatory related item

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
Locked
Katy
Posts: 145
Joined: Wed Dec 02, 2015
Location: Canada

06 Jan 2017

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.

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

08 Jan 2017

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) {...}

Katy
Posts: 145
Joined: Wed Dec 02, 2015
Location: Canada

09 Jan 2017

Thanks! works great!

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 3 guests