Conditional Field Data based on selections on previous fields
Posted by Katerina - Sep 16 ’14 at 05:53
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
-
Dmitry KozlovAdminMember for: 6 years 2 months 22 days
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://formsdesigner.blogspot.com/2013/07/cascading-drop-downs-with-cross-site.html
-
KaterinaMemberMember for: 5 years 7 months 14 days
Hi Dimitry,
My question is not related on SP 2013. I am asking If can do that on SP 2010?
Thanks
-
KaterinaMemberMember for: 5 years 7 months 14 days
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
-
Dmitry KozlovAdminMember for: 6 years 2 months 22 days
[#3]: Yes, it makes sense.
You can prepopulate fields based on other fields via JavaScript. Sample:
// 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 [email protected] and we will estimate your task.