Page 1 of 1

Conditional Field Data based on selections on previous fields

Posted: 16 Sep 2014
by Katerina
Hi Dmitry,


Is it possible to use Conditional Field Data based on selections from previous fields? My scenario is ass follows: I have 2 lookup fileds on my foms and I want when I make my selecetion from the first one, my options to the second one to be filtered so I can see only the ones related to my choice on the previous field.

Thanks

Re: Conditional Field Data based on selections on previous fields

Posted: 17 Sep 2014
by Dmitry Kozlov
You might mean cascading drop-downs. Yes, you can implement such logic with help of Forms Designer and Cross-site Lookup. Please, get more information in my post:
http://spform.com/forms-designer- ... office-365

Re: Conditional Field Data based on selections on previous fields

Posted: 17 Sep 2014
by Katerina
Hi Dimitry,


My question is not related on SP 2013. I am asking If can do that on SP 2010?


Thanks

Re: Conditional Field Data based on selections on previous fields

Posted: 18 Sep 2014
by Katerina
Hi Dmitry,


Appologies I explained that wrongly on my first post. What I really need to do is to default some choices based on other choices. This is the correct scenario: I have 2 or more look up fields and when I choose my opion on the first one I need the others to be preselected (get a default value) acording to the first selection. Or fill 2 other text fields with the default answers. To make it more clear let me give you an example. Lets say I have a field that holds different types of ropes and 2 other fields that have the sizes of the ropes. What I need is when I select the rope type to get the size of the rope set by default on the other fields. Is that possible using SP Forms?


I hope all the above make sence.


Thanks

Re: Conditional Field Data based on selections on previous fields

Posted: 18 Sep 2014
by Dmitry Kozlov
Yes, it makes sense.

You can prepopulate fields based on other fields via JavaScript. Sample:

Code: Select all

// handle Field1 changing
fd.field('Field1').change(function() {
	var val = fd.field('Field1').value();
	switch (val) {
		case 1:
			// populating Field2 based on Field 1 
			fd.field('Field2').value('Default value 1');
			break;
		case 2:
			// populating Field2 based on Field 1
			fd.field('Field2').value('Default value 2');
			break;
	}
});
You can send the detailed requirements to support@spform.com and we will estimate your task