Aaah I see - Why do you need to number the fieldsets? Is it a visual thing or do you need it for another purpose?
If it's a visual thing would it then be possible to alter the HTML output to be wrapped in an ordered list perhaps? Or perhaps you can use CSS counters so you don't have to play with the HTML?
Happy to help - you can get a really long way using CSS or JavaScript manipulate something where you don't know how to access / deal with the core of things.
Have a nice friday and a good weekend when it's time :)
numbering fieldsets
i am customising the views for a contour form and i was hoping there was a way that i can get the position of the fieldset.
i have tried a few things but always end up with something like:
Umbraco.Forms.Mvc.Models.FieldsetViewModel' does not contain a definition for 'Position'
anyone point me in the right direction?
Hi Fergus
Could you show some examples on how you have been trying to do it?
/Jan
For example: @fs.Position()
@foreach (FieldsetViewModel fs in Model.CurrentPage.Fieldsets) { <div class="greenform"> @if (!string.IsNullOrEmpty(fs.Caption)) {
<h2><span>@fs.Position()</span> @Html.Raw(fs.Caption)</h2>
Aaah I see - Why do you need to number the fieldsets? Is it a visual thing or do you need it for another purpose?
If it's a visual thing would it then be possible to alter the HTML output to be wrapped in an ordered list perhaps? Or perhaps you can use CSS counters so you don't have to play with the HTML?
Hope this helps.
/Jan
yes, it's a visual thing. i was hoping this was a simple task of getting position or SortOrder.
trying out the CSS counters - i was not even aware of that
CSS counters worked perfectly - thanks Jan
it's only 08:50 and already i have learned something
Hi Fergus
Happy to help - you can get a really long way using CSS or JavaScript manipulate something where you don't know how to access / deal with the core of things.
Have a nice friday and a good weekend when it's time :)
/Jan
is working on a reply...