|
|
Joined: 8/10/2009 Posts: 74
|
Hey I would like to retrieve the elements of a dropdown which is set up in the work area.
What I would like to do using I guess smart form API is access the dropdown by its name and go through the contents of it.
Is this possible ?
|
|
Joined: 8/10/2009 Posts: 74
|
Update I was trying the following :
xml_config_data = m_refContentApi.getXMLConfiguration(16)
Where 16 is my smartform Id
Response.Write(xml_config_data.PackageDisplayXslt)
When I view the print out the dropdown I want is included but the other elements of the smart form aswell. I just want to access the dropdown
i.e "Department"
So I can populate a dropdown on my site with the select values from this dropdown.
Any Help would be greatly appreciated
|
|
Joined: 6/22/2006 Posts: 1833
|
Define the list outside the smart form, then have the smart form and your other code access it.
One of these KB articles should help.
How to populate a select list in a Smart Form or HTML form from an external data source (eWebEdit400)
http://dev.ektron.com/kb_article.aspx?id=29404
List CMS folder contents in an HTML form or Smart Form Choices field with eWebEdit400
http://dev.ektron.com/kb_article.aspx?id=26936
Define data lists in content (eWebEdit400)
http://dev.ektron.com/kb_article.aspx?id=29147
|
|
Joined: 8/10/2009 Posts: 74
|
Hi Doug I was hoping to keep the set up as it is now.
Is there no way I can just read the drop down list values from the smart form itself ?
Like i can see the values in the .xslt values in the .xslt file in the XML Files folder
|
|
Joined: 6/22/2006 Posts: 1833
|
Once you have the package (which you have with the code example in your earlier post), transform the package with the DesignToFieldList.xslt (search the workarea code editdesign.aspx.vb for an example)
The field list is simple XML.
Alternately, you can use DesignToFieldListJS.xslt to get JavaScript instead of XML.
|
|
Joined: 8/10/2009 Posts: 74
|
Hey Doug thanks again for your reply
"transform the package with the DesignToFieldList.xslt"
What does this do exactly does it transform the entire xlst file is it ? or just the dropdown ?
The field list is simple XML.
And also if the above does transform the entire xslt file to XML how can I then access the node im looking for, do you have any sample code for that ? I.e root/department
|
|
Joined: 6/22/2006 Posts: 1833
|
This KB article may help.
Field List datatype and basetype attribute values in CMS400
http://dev.ektron.com/kb_article.aspx?id=29145
|
|
Joined: 8/10/2009 Posts: 74
|
Hey Doug.
Sorry that link wasn't really of to much Help. My query is really how can I access one of the Data items from all the data returned.
i.e. at the moment im trying
xml_config_data = m_refContentApi.getXMLConfiguration(16)
content_html = xml_config_data.PackageXslt '("PackageXslt")
Response.Write(content_html)
Now in this Content_html i can see the data I want but also a lot of other stuff im not interested in.
So I think what you were saying was I need to turn content_html into XML ?
I went to editdesign page like you said but couldn't really tell from there how that could be achieved.
Anymore help would be great, thanks for your help so far
|
|
Joined: 6/22/2006 Posts: 1833
|
strDesignPage = EkXml.XSLTransform(content_html, EkFunctions.QualifyURL( Your-Domain-Workarea, "ContentDesigner/unpackageDesign.xslt"), XsltAsFile:=True)
strFieldList = EkXml.XSLTransform(strDesignPage, EkFunctions.QualifyURL( Your-Domain-Workarea, "ContentDesigner/DesignToFieldList.xslt"), XsltAsFile:=True)
XPath into the strFieldList xml.
BTW, this all assumes you are using version 8.0.
|
|
|
|