Looping to set Required

Discussions about Forms Designer for SharePoint 2010.
Locked
User avatar
schuess
Posts: 82
Joined: Wed Jan 22, 2014

25 Feb 2014

I am a javascript beginner and need some guidence with a loop that will accomplish the following. I have several fields of the same input type that i want to set the required field on.


For each fd.field

where fd.field of input type = "radio"

set fd.field(' x ').title().required(true);


thanks

schuess

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

26 Feb 2014

Hi Matt,

Please, try the following JS-code:

Code: Select all

$.each($('[fd_type="RadioButtons"]').closest('.fd_field'), function () {
  fd.field($(this).attr('fd_name')).titleRequired(true);
});

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 7 guests