Radio Button

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
Locked
Bryan
Posts: 4
Joined: Mon Apr 27, 2015

27 Apr 2015

Hi,I have 1 radio button(Leave_x0020_Type) with 2 choices(Apply Leave & Cancel Leave).

I want click on apply leave/cancel leave and it will execute the alert.

But i couldnt do it with my code. Hope can get your reply soon. Thanks.


SP.SOD.executeFunc('sp.js','SP.ClientContext',testing);

function testing() {

fd.field('Leave_x0020_Type').control()._el().find('RadioButtons').click(function(){

if(fd.field('Leave_x0020_Type').value() == 0){

alert('APPLY LEAVE');

}

});

}

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

27 Apr 2015

Hi,

Please, try the following code:

Code: Select all

fd.field('Leave_x0020_Type').change(function() {
	alert(fd.field('Leave_x0020_Type').value());
});

Bryan
Posts: 4
Joined: Mon Apr 27, 2015

27 Apr 2015

Thanks

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 23 guests