Looping to set Required
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
For each fd.field
where fd.field of input type = "radio"
set fd.field(' x ').title().required(true);
thanks
schuess
- Dmitry Kozlov
- Site Admin
- Posts: 1524
- Joined: Thu Jun 07, 2012
Hi Matt,
Please, try the following JS-code:
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);
});
-
- Information
-
Who is online
Users browsing this forum: No registered users and 7 guests