Mandatory related item

rss

Posted by Katy - Jan 6 ’17 at 10:46

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.

  • Dmitry Kozlov
    Dmitry Kozlov
    Admin
    Member for: 6 years 22 days
    #1 by Dmitry Kozlov Jan 8 ’17 at 11:03

    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
    Member
    Member for: 5 years 2 months 28 days
    #2 by Katy Jan 9 ’17 at 08:56

    [#1]:  Thanks! works great!

Displaying 1 to 2 of 2 messages