Is there any simple way to create a forms / media picker relationship where someone could pick from a list of media from a folder and the ID would be passed into a document type though the create Umbraco document workflow when the form was submitted?
So I was able to get this working on the front-end by borrowing the CheckBoxList field type view for this form. It seems like it is ignoring the ID of the option (which is what I want to pass to the document type), is this because a prevalue isn't set for that in the forms builder?
Is there a way to just pass an value from a form field to a document type?
Code below:
@model Umbraco.Forms.Mvc.Models.FieldViewModel
@{
var i = 0;
var umbracoHelper = new Umbraco.Web.UmbracoHelper(Umbraco.Web.UmbracoContext.Current);
var media = umbracoHelper.TypedMedia(12195);
var mediaFolder = media.Children;
}
<select class="checkboxlist image-picker" id="@Model.Id" name="@Model.Name">
@foreach (var mediaImage in mediaFolder) {
<option data-img-src="@mediaImage.Url" value="@mediaImage.Id" name="@mediaImage.Id" id="@mediaImage.Id"> Page 1 </option>
i++;
}
</select>
<script>
$('.checkboxlist').imagepicker()
Umbraco Forms Media Picker
Is there any simple way to create a forms / media picker relationship where someone could pick from a list of media from a folder and the ID would be passed into a document type though the create Umbraco document workflow when the form was submitted?
So I was able to get this working on the front-end by borrowing the CheckBoxList field type view for this form. It seems like it is ignoring the ID of the option (which is what I want to pass to the document type), is this because a prevalue isn't set for that in the forms builder?
Is there a way to just pass an value from a form field to a document type?
Code below:
is working on a reply...