1

I have a xslt list form view. I have 3 drop down on the form - Area , Geo Market , Country for which i want to implement cascading functionality.

Data saved in list is of type Single line of text.(Cannot change the list column type)

But after cascading is implemented, data saved in list is the value of the selected option not the display text.(Geomarket selected is "ABC" , then value of "ABC" i.e. 2 is saved.)

How can i save the display text instead of Value?

my xslt data :
Area :

<SharePoint:DVDropDownList runat="server" id="ff13{$Pos}" selectedvalue="{@Area}" __designer:bind="{ddwrt:DataBind('u',concat('ff13',$Pos),'SelectedValue','SelectedIndexChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@Area')}" datasourceid="spdatasource1{generate-id()}" datatextfield="Title" datavaluefield="Title" title="Area"/>

Geomarket

<SharePoint:DVDropDownList runat="server" id="ff13{$Pos}" selectedvalue="{@Area}" __designer:bind="{ddwrt:DataBind('u',concat('ff13',$Pos),'SelectedValue','SelectedIndexChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@Area')}" datasourceid="spdatasource1{generate-id()}" datatextfield="Title" datavaluefield="Title" title="Area"/>

Country :

<SharePoint:FormField runat="server" id="ff12{$Pos}" ControlMode="Edit" FieldName="City" __designer:bind="{ddwrt:DataBind('u',concat('ff12',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@City')}" /><SharePoint:FieldDescription runat="server" id="ff12description{$Pos}" FieldName="City" ControlMode="Edit" />

Cascade is implemented using :

$(document).ready(function()
{  
  $().SPServices.SPCascadeDropdowns({
    relationshipList: "GM",
    relationshipListParentColumn:"Areas",
    relationshipListChildColumn:"Title",
        parentColumn:"Area",
        childColumn:"ddlGeoMarket",
        promptText: "Select GeoMarket",
        debug:true
    }); 

    $().SPServices.SPCascadeDropdowns({
    relationshipList: "Country",
    relationshipListParentColumn:"GeoMarkets",
    relationshipListChildColumn:"Title",
        parentColumn:"ddlGeoMarket",
        childColumn:"ddlCountry",
        promptText: "Select Country",
        debug:true
    });

  });

1 Answer 1

0

If you've customized the form, then SPServices may not work as well with it. You may need to make some adjustments to your XSL so that SPCascadeDropdowns understands what you've got going on in the DOM.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.