I have new form modified via xslt. So i have DataFormWebpart. I want to implement cascading drop down for 2 of my lookup field(Area and Country).
Can anyone help on it. I am aware of the SPServices.SPCascadeDropdowns but its not working.
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It only takes a minute to sign up.
Sign up to join this communitySPCascadeDropdowns works. It is one of the most popular functions in whole SPServices library, thus it is tested and proven to be functioning by tens of users, at the very least. Also Marc has demo page, there you can see it yourself.
XSLT in SharePoint acts as server-side templating engine, not less and not more. You should use it for one-time-only formatting of some data. XSLT by itself doesn't allow creating any AJAX or even simple postback-based solutions.
Actually, there are plenty of options when it comes to implementing cascaded dropdowns in SharePoint list forms. The most preferrable way here is to use InfoPath forms.
Here is the article which explains creation of cascaded dropdowns in InfoPath:
If you don't like Infopath for any reason, you have at least 3 other options:
First two options will involve programming. Third option is already implemented for you in SPCascadedDropdowns.
Thus if you cannot use InfoPath, and don't want to stick with development, I'd recommend you to identify your particular difficulties with SPCascadeDropdowns, and create the specific question either on the SPServices Codeplex Discussions Page, or here on SharePoint StackExchange.
code
function<br/>$(document).ready(function() $().SPServices.SPCascadeDropdowns({ relationshipList: "B", relationshipListParentColumn:"AA", relationshipListChildColumn:"Title", parentColumn:"A", childColumn:"B", debug:true }); });code
Jun 8, 2012 at 4:31
code
<tr> <td>A</td> <td><SharePoint:FormField runat="server" id="ff27{$Pos}" controlmode="New" fieldname="ASource" __designer:bind="{ddwrt:DataBind('i',concat('ff27',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@ASource')}" /></td> </tr> <tr> <td>B</td> <td><SharePoint:FormField runat="server" id="ff28{$Pos}" controlmode="New" fieldname="BSource" __designer:bind="{ddwrt:DataBind('i',concat('ff28',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@BSource')}" /></td></tr>code
Jun 8, 2012 at 4:33