Multi-selection Choice

rss

Posted by schuess - Jan 27 ’14 at 09:25

I want to run some actions IF a certain checkbox in a multi-selection input type .is(':checkedsmile based on the value of that checkbox?

I cannot figure out how to check for the value match

 

my attempt:

window.$('.fd_field[fd_name="architect"]').hide();

fd.field('contractType').control().change(function(){

if (fd.field('contractType').control()._el().find('input[type="checkbox"]').eq('Rental Agreement').is(':checked')) {

window.$('.fd_field[fd_name="architect"]').show();

fd.field('architect').title().required(true);

} else {

window.$('.fd_field[fd_name="architect"]').hide();

fd.field('architect').title().required(false);

}

});

 

PS> i could not get your iteration example to work.

window.$.each(fd.field('contractType').control()._el()

.find('input[type="checkbox"]'), function(i, el)

{

if ($(this).is(':checked')) {

alert(i + ' option is selected');

}

});

thanks!

  • Dmitry Kozlov
    Dmitry Kozlov
    Admin
    Member for: 9 years 6 months 8 days
    #1 by Dmitry Kozlov Jan 28 ’14 at 04:21

    Hello,

    Please, try the following code:

    fd.field('Choices').change(function() {
    	var checkboxTitle = 'Enter Choice [#2]'; // Put your checkbox title here
    	var checked = fd.field('Choices').control()._el()
    		.find('span[title="' + checkboxTitle + '"] > input')
    		.prop('checked');
    	alert(checked);
    }); 
    
  • Gregory Murillo
    Gregory Murillo
    Member
    Member for: 7 years 9 months 12 days
    #2 by Gregory Murillo May 9 ’16 at 03:44

    Hello I have the situation where I need to check 2 values:

    If option 1 is selected show Field X. If unchecked then hide the field

    If option 2 is selected show Field Y. If unchecked then hide the field

     

    Any hint?

  • Gregory Murillo
    Gregory Murillo
    Member
    Member for: 7 years 9 months 12 days
    #3 by Gregory Murillo May 9 ’16 at 03:47

    Nevermind. I have figured it out. I added two controllers for .change function for the same field, asking for the different values in each one

  • acquiro
    Member
    Member for: 2 years 10 months 3 days
    #4 by acquiro Jul 2 ’20 at 12:25
  • jonemartin
    Member
    Member for: 8 months 14 days
    #5 by jonemartin Dec 6 ’22 at 07:21

    You can consult with a Psychiatrist in Dubai at https://camaliclinic.com/adults/psychiatry/.

  • jamesjakson
    Member
    Member for: 4 months 12 days
    #6 by jamesjakson Dec 15 ’22 at 01:02

    Multi-selection SharePoint is a great feature that allows users to select multiple items from a list. This is useful for scenarios such as selecting items for a purchase.

    Best solar consulting services in Cape Cod MA

  • jonyjones22
    Member
    Member for: 3 months 29 days
    #7 by jonyjones22 Dec 15 ’22 at 01:03

    When multi-selection is enabled, a checkbox is added to the list item that allows the user to select multiple items. If the user selects multiple items, a pop-up appears that displays the selected items.

    Affordable Residential Lock Repair services in Buckeye AZ

Displaying 1 to 7 of 7 messages