Please give the media field a try.
I'd like to know how I can add a sf-document-selector to a widget designer like e.g. the sf-page-selector.
The sf-page-selector is showing a button (select) which opens a window to select a page. The sf-document-selector is just showing the selector at once, and conflicts with other properties on my widget designer.
Can't I do something like:
Thanks, this gives me the desired functionality.
When I place multiple MediaField components on my widget designer, it is only updating the first one.
What should be done to make this work?
So, if I choose a file from the second or third selector, it will update the first one.
Any ideas on how to use multiple MediaFields inside a widget designer? It seems not to work when trying to persist values to the database. If I have 3 MediaFields that are bind to 3 different properties, the first one is the one that is updated 3 times, so always gets the value of the Document that is chosen from the DocumentSelector.
Has anyone had success in implementing this? I have found there are also problems if you are trying to use the kendo control and the sf-media-field in the same widget.
I looked at the author widget and tried to add these two elements. The media field alone works perfectly. And the html field alone works perfectly. If you put these on the same page and try to add a document via the media field and then try to add a document through the open document selector through the kendo UI then it breaks.
IE I have a page with these two fields and can't add documents through the kendo-content-block.
<sf-media-field sf-media-type="documents" sf-model="selectedItems" />
<sf-html-field class="kendo-content-block" sf-model="properties.Text.PropertyValue"></sf-html-field>
When you try using kendo the document selector opens and you can select a document you just can't save it. The button to save is inactive because there is no selected document.
(I am new to customizing the widgets, but it certainly seems like there is a problem with the sf-media-field and trying to bind to it multiple times on the page, similar to the post that Daniel made)