I have a question about the Drop List field type of Sitecore Web Forms for marketers.
I want to build a web page which has two drop lists that are connected. When the first one changes, the other one's data changes based on the selected value of the first one.
How do I achieve this?
This is not possible out of the box. You will need to build a custom WFFM field that will store the 2 droplist. If you need more information on how to build custom WFFM fields you can checkout this blog post.
Related
I'm building a products table to show all the products attributes. However I need to allow users to add/edit/remove those attributes from the products later on in production without any dev work. I thought about branch templates but when I edit the branch template, existing products are not getting updated. Maybe I'm looking in the wrong direction? Any suggestions?
In an older project we have a similar setup with product and attributes and used a custom database to help us out:
products are stored as items in Sitecore
attributes are stored as items in Sitecore
a custom database stores the values of all attributes for all products
publish events are used to keep the custom database in sync when deleting products
on a product template we added an extra tab in the content editor including an aspx page that offers an editor on our custom database for that product. We use the products Sitecore ID and display all possible attributes in an editable way.
Most attributes have simple string values but that is extendable. Our attributes have a type (string, bool, (multi-)list, ..) and we use that to create the editor. The lists refer back to Sitecore items (a parent is selected on the attribute item).
Adding an extra tab in the editor can be done by creating a new item in the core database (/sitecore/content/Applications/Content Editor/Editors) that point towards your aspx file. In the standard values of your product template, you select the created "editor" in the Appearance section. (note that this is in Sitecore 6 - might have been changed although the path to the editors is still valid)
This solution does mean that the values of your attributes are stored outside Sitecore, but it worked for our requirements.
I'm using Sitecore 7.2 with MVC. I have a component that has a Multilist with Search field that points to media items. There can be multiple media items here.
Is there a way to make this list editable via the Page Editor?
Thanks
Yes, you will need to use Edit Frames.
These posts describe what they are and how to use them:
http://briancaos.wordpress.com/2011/11/28/using-sitecore-editframe-in-pageedit/
http://www.cmsbestpractices.com/how-to-properly-use-sitecore-edit-frames/
In Sitecore, how can I get a list of all pages on which an item appears? Thanks
Internally Sitecore maintains a database of references between Items called the Link Database. You can query this by using the "Links" dropdown on the "Navigate" tab on the Content Editor ribbon. That may give you the information you need.
(You can also query the Links Database via code - See example code on http://laubplusco.net/sitecore-item-extensions-get-referrers-as-items/ for one example of doing this - or the docs in SDN)
If the relations to your target Item are via selection field types (multilist, treeview etc) or via the DataSource property of Renderings/Sublayouts/etc then you should be able to select the item you're interested in and click the "Links" dropdown to see a list of the relationships Sitecore has recorded. This will list system relationships (which template does this item use) as well as the sort of relationships you're interested in where one item points at another item.
Note that this approach cannot tell you about some types of relationship: the most common sort being ones which are calculated at runtime. (EG API queries, or searches) because those relationships don't exist in the Links Database.
-- edited to add --
You ask about getting the URLs for these Items. In code you can get the URL for an item by calling LinkManager.GetItemUrl() and passing in the item you're interested in. That gives you the public website URL, rather than the Sitecore Item Path that you'd get directly from the Link Database.
When one has added a WFFM form to a Sitecore Item, you can go to the Presentation Details and click on Form. There you'll see an option called ReadQueryString - Reads initial values from the url query string.
My form has a few fields, one of which being Email. I tried adding ?Email=test to the URL of the page that hosts this form, but the value is not being picked up. Am I correctly understanding the intended purpose of this option? Am I using it correctly?
Sitecore version 6.5; Web Forms for Marketers version 2.3
You understood the purpose correctly, when that option is checked the form's initial values are read from the querystring.
I have used this in my project and it works fine.
Make sure that you are using the field's item name in the querystring, not the displayname or title.
Also double check if you published the item after checking the ReadQueryString option.
We're using Django 1.4's new wizard to create, well, a wizard. We have a wizard where, a few steps into it, the user has to select a row from a listview/datagrid/table. We use Django-tables2 to show this data.
The problem is that django's wizard has a single fixed URL, and uses a hidden form field that tells the wizard at what step it is. So all forms submit via POST back to the very same URL, and Django's wizard figures out from which page the user comes, stores the submitted data and based on the hidden form field, figures out where to go next.
Django-tables2 is an HTML grid that supports paging and sorting through a set of data. However, it does so using http GET, passing some querystring variables to indicate what column to sort and/or what "page" of data to show.
As soon as we use sorting or paging in a tables2 grid inside a Django wizard, the GET will call the same URL, because it is a GET, the Django wizard will not receive the hidden form values it expects that regulates navigation, and it will happily show the first page of the wizard by default.
I'm wondering if anyone has experience with this and knows of a solution to keep both the Django Wizard as well as the Tables2 functional.
Thanks in advance,
Erik