This project is read-only.

Feature Team: Core Fields

Topics: Announcements
Oct 5, 2011 at 11:39 PM

This thread is for the Core Fields feature team. If you want to help with the design, implementation, testing and documentation of this feature, please chime in here.

The Core Fields feature's goal is to have the most common types of fields available out of the box in Orchard, beyond the text field that we ship with today. The feature team will implement new fields and bring existing fields from the gallery into the core.

Initial members:

  • Nicholas Mayne
  • Bertrand Le Roy
Oct 6, 2011 at 1:28 AM

Sign me up!

  • David Hayden
Oct 6, 2011 at 1:40 AM

Cool. Nick and David, can you please open an account on Trello so that you can create and pick tasks?

Oct 6, 2011 at 2:58 AM
Edited Oct 6, 2011 at 3:00 AM

I created an account.

Oct 6, 2011 at 3:15 AM

I am also interested in helping out the Orchard development.  I already have an account on Trello.

Oct 6, 2011 at 4:23 AM

I would like to contribute on this, I can do testing and docs.

Oct 6, 2011 at 4:44 AM

Sam: I invited you to the board.

Mistercain: can you please open an account on Trello?

Thanks all for offering to help.

Oct 6, 2011 at 12:39 PM

I'd like to help too. My trello account : antoinegriffard

A basic but useful one would be a BooleanField.

Most of the Fields proposed in 'Contrib' packages should be integrated. Sebastien could probably help for this.

It would be also interesting to propose some Html 5 input fields.

Oct 7, 2011 at 6:32 PM

My Trello account isnicholasmayne

Oct 7, 2011 at 9:28 PM
Edited Oct 7, 2011 at 9:33 PM

OK, let's get this thing started. Strawman proposal time! Here is a tentative list of what we could include, with links to existing modules when they exist. Feel free to include your yeahs and nays. For example, I included phone and address but I personally think we should leave these as modules rather than bring them to core.

Oct 7, 2011 at 9:47 PM

Image lets a user upload an image, and forces some dimensions parameters. Media Picker uses the Media Picker to select ANY media, not just images.

Oct 7, 2011 at 10:09 PM
Edited Oct 7, 2011 at 10:10 PM

To start we dont want to bundle a huge about of these fields in to Orchard. What we need to think about are the most used ones. I recon...


The HTML one needs to support Markdown as well.


Oct 7, 2011 at 10:22 PM
Edited Oct 10, 2011 at 8:56 PM

My Trello login is mistercain

Oct 7, 2011 at 10:28 PM

Just a quick note about the "Image" Field while it is fresh in my mind.

We definitely need an "Image" Field, but two things:

  1. It needs to use the Media Picker, which has the option of uploading an image.
  2. It needs to have the option of displaying the actual image selected.

None of the ones above do both, which is a deal breaker for me.

I created an ImagePart that does this that I use a lot, but I haven't created it as a field. If you want, I can modify Sebastien's Media Picker with the ability to display the image and then we have the "perfect" Image Field :)

Just a thought,


Oct 7, 2011 at 10:30 PM

I agree with Jetski5822, but would put them in a different order.  Here are my top 3:

  1. DateTimeField
  2. BooleanField
  3. PhoneNumberField

Some of these are clearly easier to implement than others, I would recommend putting those at the top of the list as well.

Oct 7, 2011 at 11:49 PM

I'll weigh in on Enumeration. I think it's super-important.

Oct 8, 2011 at 12:20 AM

Not the most priority fields, but I would suggest these just for the record:

  • Taxonomy field - ability to create a graph of terms, with autocomplete/picker
  • Person field - picker for people registered in the website
  • Number field
  • Currency field

I would also consider Enumeration with a search picker instead of big drop-downs.



Oct 8, 2011 at 12:28 AM

We won't do taxonomy field because that would require bringing the whole taxonomy module into the core distribution, which we might do one day, just not for this version.

Oct 10, 2011 at 8:45 PM

Found this on the MSDN Flash today:  Worth considering, although it's not fully baked yet.  Not sure if Orchard has a dependency on MvcContrib either, that might be a deal breaker.   

Oct 10, 2011 at 8:51 PM

Yes, that looks like a good direction to take. MvcContrib is under Apache so it is fine to use. Whether we want to take this in or just steal some of their code remains to be discussed. Sébastien, what do you think?

Oct 10, 2011 at 9:30 PM

Fluent everywhere is good, but remember those will be dynamic fields, with dynamic properties. So "Requiered" will have to be a checkbox at the settings level, which means from a developer perspective, having a Fluent helper won't help much. Also, those behaviors will be mostly checked in the shape template itself, and using Razor so not sure how much it will help. Whatever I am definitely for using Html5, as long as we also rely on server side validation.

What I would like all fields to have:
- Setting for the "hint" text displayed to the end user (e.g., in Image Field)
- Import/Export 


Oct 10, 2011 at 9:50 PM

Okay so potenital

Media Picker Field (Attachment field)
Person Field - picker for people registered in the website
Number Field
Currency Field
DateTime Field
Boolean Field
Image Field
Hyperlink Field
Enumeration Field
Video Field
Content Items Field
Email Field
Address Field
Phone Number Field
Html/Rich text Field - This might be made pointless if we do a 'hint' field.
Custom Template field (allows you to specify to push out)

Fields that we are not doing...
Taxonomy field (seperate module which is a little bit more than jsut a field)

All fields should have

- Setting for the "hint" text displayed to the end user (e.g., in Image Field)
- Import/Export

More ideas?

Oct 10, 2011 at 10:18 PM

What is a "hint" field and why does it make rich text pointless?

Can you elaborate on custom template?

Oct 10, 2011 at 10:23 PM

1- I am not sure we need the Address field.
2- I don't really get the Video field, if the Media Picker is extended to select how to render the picked media 
3- What about Reference fields, User is one, but there could be a Content Item(s) Field, e.g. "See Also" kind of feature, could be filtered by Content Type in settings


Oct 10, 2011 at 10:24 PM

Install the Image Field, Taxonomy, or Media Picker field, go to settings, and look at Hint, you will be sold.

Oct 12, 2011 at 11:11 PM

We made design decisions today with the steering committee. The Trello tasks have been created, so development work can now begin in the fork that Nick is creating.

We are keeping:

  • Bool
  • Number (with a precision setting)
  • DateTime (with new range validation settings and time zone awareness)
  • improved Text (with flavor, validation regex and length settings)
  • Media (handles images, video and attachments)
  • Enumeration (simple or multiple, with a choice of UI)
  • Content Item Reference (simple or multiple)
Oct 13, 2011 at 4:05 PM

Can we consider the option to have a Display Name setting on every field?

Oct 13, 2011 at 8:46 PM

That should be filed as a separate bug so that we can implement it for all fields, the ones we build and any others (and I agree that we should do it, yes).

Oct 14, 2011 at 12:55 AM

There's already a workitem:

Oct 14, 2011 at 2:13 PM

I will be creating the fork this evening. Cheers, Nick

Oct 15, 2011 at 12:59 PM
Edited Oct 15, 2011 at 1:01 PM

Yo Yo Fork created here yall

Repo here..

Codeplex names for contributors!!!???

Oct 15, 2011 at 3:24 PM

I'd like to start to implement the Enumeration Field.

I have added me as a member on Trello Board.
As explained in the card :
The list of possible values will be a setting (exposed as a plain multiline textbox).
Settings include simple or multiple choice, and editor UI (checkboxes, select, multiple select, radio buttons, etc.)

It will be similar to this one :
Do I have to contact the author ?
He also made an Hyperlink Field :
May be he could help us.

Nicolas : I have retrieved the Fields Fork. You can add me as a contributor.

Oct 15, 2011 at 4:05 PM

@agriffard - You are added.

Oct 15, 2011 at 5:27 PM

Yes you should contact the authors and point them to this thread so they know. They might also want to contribute.

I'd like one field to be done nicely, so that all modules can benefit from the mistakes, or good things. It will also be an opportunity to review the code and give you advices.

Please remember that the coding style is K&R, and that you can configure a Visual Studio Link to have it's own dev settings if you don't want to mess up with you current preferences like this:
"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe" /RootSuffix Orchard

Post on this thread if you have any question. 

Oct 18, 2011 at 12:31 PM

I contacted the author with the 'contact owner' feature in Orchard Gallery but non answer for the moment.

Oct 18, 2011 at 12:44 PM

Some questions :

Do we have to develop the new fields in Orchard.Core/Common ?

Do we need to separate the feature in Module.txt ? (Should TextField be a feature ?)

@Sebastien : Can you change this (and Add attributes [OrchardFeature("Orchard.TextField")] in the classes ? ) 

Should we made a discussion for each Field ?

Oct 18, 2011 at 2:29 PM

I think we really need multiple pickers. like a multiple media picker. just an idea

Oct 18, 2011 at 5:59 PM

@antoine: I would prefer another module, as we might then push some updates without requiring changes to the core. We could call it Orchard.CommonFields, but subject to discussion. Please follow how it is done for the latest modules (Tokens, Rules, ...)
The whole module will be only one feature.



Maybe the default implementation of those fields should include a way to allow multiple values. Makes a lot of sense also to me. And I think there is no way to create sort an aggregate field which could be able to extend any existing one, especially because of querying concerns.

Oct 18, 2011 at 8:59 PM

@Sebastien or @Nicolas : Could you create a project and make it an hg sub repository in the Fields fork as it has been made for Tokens, ... ? 

I guess it will be the good way to be able to merge it easily later.

Oct 18, 2011 at 9:01 PM

Do we need a seperate codeplex site, do you not think that a Fork is enough? afterall this will be merged back in to the orchard repo eventually with a pull request.

Oct 18, 2011 at 9:02 PM

I can create a Commonfields project now in the orchard fork?

Oct 18, 2011 at 9:58 PM

Actually we need to create a codeplex project, then fork it and manage the work force on this fork ;)

Let me create the project. The current Orchard fork can be removed.

Oct 18, 2011 at 10:06 PM

Just to pitch in, you can take a look at my Related Content module (in use my Better Menus module) as implementation of a Content Items Field.  That said, it's really a complex issue to tackle.

Oct 18, 2011 at 10:15 PM

Argh!! okay... i do like the name :)

Oct 18, 2011 at 10:20 PM

Everything is done:

Oct 18, 2011 at 10:20 PM

Oct 18, 2011 at 10:30 PM

Can you add the devs to it please?

Oct 18, 2011 at 11:28 PM

You are already added to the fork itself

Oct 20, 2011 at 11:42 AM

Do we still have to use the fork ?

1) I made a clone of this fork and a clone of in another directory Orchard.Fields.

2) In Tortoise hg When I try to add a sub directory to the fork pointing to the Orchard.Fields directory, I have a an error Message : ...\Orchard.Fields is not a valid repository inside ...\FieldsForkFolder

 I tried with the directory being outside and then I tried to place it in /Modules but I had the same error.

I don't know how it has been configured for the Tokens, Rules, ... modules.

Oct 20, 2011 at 5:57 PM

You need to use this fork:

First task is to pull the initial commit from this same project, as I created the fork before committing them.

Oct 21, 2011 at 6:08 AM

1) bertrandleroy ask me to chime in this info:

i found this is very very very useful for html 5, because orchard focuse on html5 , will next release include it in framework? so i do not need to add ref almost every modules.

<package id="MVCHtml5Toolkit" version="1.2.0" />

2) I created a telephone field , will upload to gallery in 2,3 days as ref.

3) as for the ImageField and MediaPickerField, I used both for register page as following

                  part => part
                 .WithField("FirstName", field => field.OfType("TextField"))
                  .WithField("LastName", field => field.OfType("TextField"))
                 .WithField("Type", field => field.OfType("ChoiceListField")
                 .WithField("CompanyName", field => field.OfType("TextField"))
                 .WithField("WorkPhone", field => field.OfType("TextField"))
                 .WithField("HomePhone", field => field.OfType("TextField"))
                 .WithField("CellPhone", field => field.OfType("TextField"))
                 .WithField("Website", field => field.OfType("HyperlinkField"))

                // .WithField("MediaPicker", field => field.OfType("MediaPickerField"))
                 .WithField("Image", field => field.OfType("ImageField")


I found MediaPickerField can not work (the button is not function),

ImageField produce log error ,saying invalid (format or stream  )  image = Image.FromStream(stream)in line 105 of ImageFieldDrive.cs
but, inside Admin panel,both r wprking as expected without problem.
Oct 21, 2011 at 9:17 AM

just upload it, see

Oct 21, 2011 at 3:16 PM

I pulled an initial commit in with a first version of an Enumeration Field.

I managed to made it a subRepo of the fork in which I added the Orchard.Fields module in the solution.

I hope this is the structure that was expected.

Oct 21, 2011 at 4:55 PM

It must be wrong as we don't need anything more that what I had already done ;)

I checked the fork and nothing has been pushed to it, so no worry, but let me explain exactly how it has to be done, then there will be no more hesitation:
- The project will host the module, officially.
- We have a fork (the one I created) for the ongoing effort on those fields, everyone is free to create other forks, but the feature crew focuses on this one
- When the fork is mature enough we'll take those changesets back to the main repos on

Now what you can do antoine i:

- clone the fork using this url:
- at this point you should have an empty folder with just the .hg
- PULL all changesets from the main repos (, to be in sync with what I already committed onto it 
- PUSH those changesets to the fork

At this point the fork and the main repos will be officially in sync, now you can develop

- add this folder/module to an Orchard enlistment, preferably to a stable one from 1.x (current one is ok)
- add the project to this orchard solution for easier development
- develop
- PUSH the changes on the fork

then you should get it and can continue.

This way you can also change Orchard locally if needed, and sync to any specific changeset.


Oct 24, 2011 at 6:48 PM

OK, I made a first commit of the EnumerationField and pushed the changeset to the fork

I tried to respect the conventions you used to develop the other contrib modules.

I'll proba

Oct 24, 2011 at 6:50 PM

I'll probably make a discussion on how I developed it and what must still be done.

Oct 24, 2011 at 7:28 PM

Cool, I am doing some fields for a client at the moment, so will look at taking what I have learnt to contribute back.

Oct 27, 2011 at 6:00 PM

Please guys, can you take a look at what options are available in Drupal's modules by default for their fields ?

It's a very good source of inspiration to say the least.

Oct 31, 2011 at 8:30 AM

i can not push to

just modified views/Fields/Enumeration.cshtml as follow:


@using Orchard.Utility.Extensions;
@using System.Linq;
    string valueToDisplay = string.Empty;
    string[] selectedValues = Model.ContentField.SelectedValues;
    if (selectedValues != null) {
        string valueFormat = T("{0}").ToString();
        string[] translatedValues = selectedValues.Select(v => string.Format(valueFormat,  T(v).Text)).ToArray();
        string separator = T(", ").ToString();
        valueToDisplay = string.Join(separator, translatedValues);
    if (!string.IsNullOrEmpty(valueToDisplay)) {
        string name = Model.ContentField.Name;
    <p class="text-field">@T(name.CamelFriendly()): @Html.Raw(valueToDisplay)</p>

Oct 31, 2011 at 8:48 AM

Why can't you make a pull request?

Oct 31, 2011 at 10:07 AM


abort: authorization failed     ---for push

Oct 31, 2011 at 10:08 AM

maybe because i do not have  account on Trello

Oct 31, 2011 at 11:26 AM

May be because you are not a contributor on the codeplex project. Sebastien should add you?

I can change the code but there is a work item (assigned to 1.4) that will allow to add a display name to each field : Vote for it.

Oct 31, 2011 at 5:54 PM

I have added you to the fork. 

But, I don't think this this change should be welcome without a small discussion, because translating database data should be done is a few places. I am neutral here because I see how it makes sense to have those elements translated as they might be displayed on the front end. But I also tend to dislike it has it's not a resource string, but some "Content" somehow, which would then make it more a Localization issue.

Oct 31, 2011 at 6:00 PM
Edited Oct 31, 2011 at 6:01 PM

Oh, already a fork, ok.

Oct 31, 2011 at 6:16 PM

I just pushed a DateTimeField, which is slightly different from the one on the gallery. And in order to build it you will need the latest version of the 1.x branch, as it is compatible with Projector.

Oct 31, 2011 at 6:29 PM


There is just a little conflict if the 'Contrib.DateTimeField' is already installed.

Nov 8, 2011 at 5:24 PM

I commited a first implementation of a BooleanField.

I tried to have a nullable value. I don't know if it's a good solution.


I'd like to enable the possibility to use it with Orchard.Projector.

I added this code in the Driver :

protected override void Describe(DescribeMembersContext context) {           

context.Member(null, typeof(Boolean), T("Value"), T("The boolean value of the field."));       


If I add a Boolean Field, it appears in the list of available Filters of a Query, but when I try to configure it, it returns an error :

Sequence contains no matching element

Line 127:            var form = _formManager.Build(filter.Form);

In Orchard.Projections\Controllers\FilterController.cs


Is there something missing ?

It seems that there is an BooleanFilterEditor and a BooleanFilterForm in Orchard.Projections.

Nov 8, 2011 at 6:01 PM

It might be a bug in the Projector, let me see.

Nov 8, 2011 at 10:32 PM

There was a bug in Projector, then another one in Orchard regarding Nullable fields. 

I was done a huge refactoring of the module, please check them. And it also works with Projector now.

Nov 8, 2011 at 11:12 PM

There is another error now, accessing to the field value in Editor Template :

This operation is only valid on generic types.

Line 23:             if(t.GetGenericTypeDefinition() == typeof(Nullable<>)) 

In src\Orchard\ContentManagement\FieldStorage\SimpleFieldStorage.cs

[InvalidOperationException: This operation is only valid on generic types.]
   System.RuntimeType.GetGenericTypeDefinition() +12756670
   Orchard.ContentManagement.FieldStorage.SimpleFieldStorage.Get(String name) in C:\DEV\Applications\Portals\Orchard\Orchard\src\Orchard\ContentManagement\FieldStorage\SimpleFieldStorage.cs:23
   Orchard.ContentManagement.FieldStorage.FieldStorageEventStorage.Get(String name) in C:\DEV\Applications\Portals\Orchard\Orchard\src\Orchard\ContentManagement\FieldStorage\IFieldStorageEvents.cs:38
   Orchard.ContentManagement.FieldStorage.FieldStorageExtension.Get(IFieldStorage storage) in C:\DEV\Applications\Portals\Orchard\Orchard\src\Orchard\ContentManagement\FieldStorage\IFieldStorage.cs:8
   Orchard.Fields.Fields.BooleanField.get_Value() in c:\DEV\Applications\Portals\Orchard\Orchard\src\Orchard.Web\Modules\Orchard.Fields\Fields\BooleanField.cs:11
   ASP._Page_Modules_Orchard_Fields_Views_EditorTemplates_Fields_Boolean_cshtml.Execute() in c:\DEV\Applications\Portals\Orchard\Orchard\src\Orchard.Web\Modules\Orchard.Fields\Views\EditorTemplates\Fields\Boolean.cshtml:11
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +280
   System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +104
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +173
   System.Web.Mvc.Html.RenderPartialExtensions.RenderPartial(HtmlHelper htmlHelper, String partialViewName) +111
   Orchard.Core.Shapes.CoreShapes.RenderInternal(HtmlHelper Html, TextWriter Output, String TemplateName, Object Model, String Prefix) in C:\DEV\Applications\Portals\Orchard\Orchard\src\Orchard.Web\Core\Shapes\CoreShapes.cs:644
   Orchard.Core.Shapes.CoreShapes.EditorTemplate(HtmlHelper Html, TextWriter Output, String TemplateName, Object Model, String Prefix) in C:\DEV\Applications\Portals\Orchard\Orchard\src\Orchard.Web\Core\Shapes\CoreShapes.cs:632

Nov 8, 2011 at 11:55 PM

It also broke some unit tests. I fixed them, so it should sort it out too.

Nov 9, 2011 at 4:38 PM

OK, I retrieved your changes and it seems better.

The filters on a BooleanField don't seem to work for every cases.

Repro steps :
I added a BooleanField named 'Featured' on a blog post with an optional value 'Not set'.
I created 3 blog posts with Featured = Not set, true and false. 
If I configure a query 'Featured posts' with a filter on Featured:Value and I create a widget, the filter only works if I set 'Yes' in the value of the filter.
(If I set No or Undefined in the value of the filter, it doesn't display the post with Featured = No or Undefined.)

Also, when I add this kind of filter, the 'Content type' sort (Created, Modified, Published date, ...) are not available anymore in the sort criterion.
Is it normal ?

Nov 9, 2011 at 6:01 PM

You need to reinstall Orchard, they are now part of the migration. And I think I might have forgotten something in regard to Undefined values on Booleans.

Nov 9, 2011 at 7:00 PM

I reinstalled Orchard.

Now the filter works with 'Yes' or 'No' filter values but not with undefined.

Nov 9, 2011 at 7:23 PM

As expected, I pushed the change, but ORchard is not synced with the latest Projection changeset, you can sync it locally by pulling the latest from Projection, and updating to this changeset.

Nov 9, 2011 at 9:56 PM

Hi everyone, I'm a new user, not a developer but hope someone can answer a couple questions. 1. If i download Orchard through webmatrix, as I've done is it possible i'm not getting complete install? 2. I'm confused on menus. I can't find documentation to explain how to do submenus and what all the terms mean (child, parent, sibling. If I give a menu item a 2.1 prefix, will it automatically create it as sub for menu item 2? i know this is basic, which is why i'm confused about why i can't find instructions. i also downloaded advanced menu and all properties are enabled but can't seem to use it either. HELP!! Thanks!


Nov 9, 2011 at 9:59 PM

Probably not the best thread to post this, but here goes...

If you download with WM, you don't get the full source code, and only a few out of the many available modules. In particular, you'll find several more advanced navigation menus on the gallery that you can install on top of your existing Orchard. Advanced menu is one, and I'm not quite sure how I can answer the "can't seem to use it" comment. There are other similar menus that may be a little more accessible for you.

Nov 9, 2011 at 11:02 PM

thank you for response! so you recommend i download it independently from wb?

Nov 9, 2011 at 11:07 PM

Depends what you are trying to do. Can we move this to a new thread? This is wildly off-topic.

Nov 9, 2011 at 11:15 PM

The Filter with 'undefined' value is still not working, even with the latest change.

It doesn't display anything.

Nov 15, 2011 at 5:02 PM

I commited a first version of a LinkField in the fork.

Nov 15, 2011 at 7:59 PM

Let me have a look at it

Nov 15, 2011 at 9:43 PM

Just made some little changes

Nov 15, 2011 at 9:59 PM

OK, thank you.

Nov 18, 2011 at 8:50 AM

addition for a imagepicker: make it possible to pick more then 1 image. 99% of our websites needs this

Nov 29, 2011 at 1:51 PM

I commited a first version of a Numeric Field.

I made some tests and there are some issues to save the value sometime or to use them with Projector :

1) I add a NumericField on BlogPost content type.
=> When I click on 'Publish Now', the value is stored in xml in Orchard_Framework_ContentItemVersionRecord but not in Orchard_Framework_ContentItemRecord.

2) I add a NumericField on User content type (with Contrib.Profile activated).
=> I can set the value of the field : 50
I configure a query Users.
=> I add a filter for Content type = User.
I configure a Projection Widget with this query.
=> User is displayed with the field.
I add a filter for MyNumeric:Value with Value 'is less than' 100.
=> No user displayed.

@Sebastien : Can you help me checking that cases?

Nov 29, 2011 at 5:28 PM

I made some changes recently on how the Infoset is stored for versioned content types. It might explain this issue, I will debug it.

Nov 30, 2011 at 1:16 PM

I'd like to fix an error message but I don't know how :

If I enter a bad value in the Numeric field, an error message will appear : "The value '...' is not valid for Value." because the property name is 'Value'.

What is the better way to validate the value and specify anoter error message?

Nov 30, 2011 at 5:50 PM

[Required(Message = "Foo")] on the model which gets updated.

Nov 30, 2011 at 7:46 PM

I want to validate the format, not the fact to be required.

Nov 30, 2011 at 7:48 PM

This is just an example, you can use [Regex] too, I just focused on how to define a custom message.

Dec 1, 2011 at 12:47 PM

Yes, but I would have liked to parse the value in the Driver in the Editor post method to validate with the current culture.

E.g : A numeric value would be written 1.0 in english and 1,2 in French.

I saw you made it in DateTimeField by using a viewModel in the Editor with string Properties for Date and Time. Then you can parse the string in the Driver.

Is it the good way to do it?

Dec 1, 2011 at 1:16 PM

I also would like to start implementing a more generic Input Field with more options than the Text field.

It would allow to specify different input types and attributes :

so it could use HTML 5 input types in Editor.


For a good integration in various browsers, it would be better to use something like Modernizr.

It should be another dependent module that would help to load the script when needed, detect if features are available and may be, provide some fallback scripts and controls.

Dec 1, 2011 at 5:34 PM

Should that be a separate field? Shouldn't each field know to render itself with the proper HTML5 tag?

Dec 1, 2011 at 11:44 PM

It seems that an interesting project has been released November 30th to provide an equivalent of some Html 5 controls : 

Dec 1, 2011 at 11:53 PM

Bad, bad license. Unfriendly to commercial projects. Can't use that.

Dec 2, 2011 at 9:00 AM

OK. The next version of Jquery UI (1.9) seems also promising :

And other controls they plan to integrate too :

Dec 3, 2011 at 5:18 PM

Concerning Fields and Projector, to summarize the current issues I encounter :

I did a fresh new Install with the latest version of the sources.

If I enable Projector as first module, I have an error because 'Tokens' is not enabled and then if I don't Enable 'Forms', I have an error if I add Filter in a Projection => add dependencies in Module.txt

If I add a Field on the 'BlogPost' Content Type, when I save a post, the values are saved in Orchard_Framework_ContentItemVersionRecord but not in Orchard_Framework_ContentItemRecord.

If I use a Numeric Field and I make a projection with a filter on this Numeric Field, the projection displays nothing.

If I enable Contrib.Profile and I add a Field on the 'User' Content Type : I have an error when I create a user.

Dec 3, 2011 at 5:29 PM

Also, I detected a strange behavior when I have Fields on 2 different Content types (ex : 2 NumericFields on Event and User) :

In a projections 'Events' with a Filter 'Content Type is Event', If I add a Filter on Event.MyField and don't set a description, It displays in Filters list : 'User.MyField {operator} ' while the link to Edit and the value in Database are correct.

Dec 6, 2011 at 5:44 PM

For the BooleanField, if I choose 'Checkbox' as Selection mode, There is an error when I save the field if the checkbox is selected : The value 'on' is not valid for Value.

I don't know how to fix this in the EditorTemplates\Fields\Boolean.cshtml

Dec 6, 2011 at 5:53 PM

I had the same issue on another for, just add value="true" and checked="@(Model.Foo ? "checked" : "" "

Dec 6, 2011 at 9:04 PM

If I add 'value="true"', it will always set True to the field , even if I uncheck the checkbox.

Dec 6, 2011 at 11:54 PM

Can you take a look at src\Orchard.Web\Modules\Orchard.Users\Views\EditorTemplates\Parts\Users.RegistrationSettings.cshtml

Dec 11, 2011 at 10:36 PM

for datetime field, can we have the more settings 


public enum DateTimeFieldDisplays {        DateAndTime,        DateOnly,        TimeOnly    }


public enum DateTimeFieldDisplays {        DateAndTime,        DateOnly,        TimeOnly, YearOnly, MonthOnly    }

Dec 13, 2011 at 6:39 PM

Understanding this is eventually going to be integrated into the core... is it possible to use this module now?
I've downloaded the source and included the project in my 1x enlistment. The module is enabled, but I'm not seeing any way to use it or select any new fields other than the original text field. Am I being too anxious to get my hands on this new feature or just doing something wrong? I'd rather not have to use additional modules to accomplish what you guys are working on.

Stay Awesome!


Dec 13, 2011 at 6:54 PM

The current code doesn't compile for previous versions, because there is some code for the integration with projector. If you really want to play with it, go to the drivers, and comment the Describe() methods, then it should work.

By the way, the real current code is in the Fork under the source code tab, not on the main source code.

Dec 13, 2011 at 7:05 PM

I set up a clone of the default tip, then updated to 1x, but reading your discussion here it looks like there is a totally separate fork for this feature/module
and I'm not sure how to update my local "clone" since the hg url is completely different, HG tells me the source is not related and won't update.
That's when I decided to download the source and see if I could just stuff it in there.
Sorry for being such a noob/knob ;) I'll try commenting out the Describe methods.

Thanks again for the help!

Dec 13, 2011 at 9:08 PM

Got 'er all sorted now and so far so AWESOME!!! I didn't follow your simple instructions above because I thought it was a full Orchard clone rather than just a module I could drop in (like I did with the source I downloaded, but this time it actually has all the files) and I can update it with HG.

Liking Orchard more and more every day and hoping to contribute something back one of these days... I still have a ways to go as you can tell ; )

Dec 13, 2011 at 9:30 PM

Want to contribute ? Let's say you could change the TextField so that we can have some options like in the other ones: Hint, Mandatory, Validation (size limit), Display size

You can do almost everything by copy pasting from the other fields, and would help us ;)

Dec 13, 2011 at 11:11 PM

I'm just looking through the settings for each field now... I'll let you know if it makes any sense to me ;)

Dec 13, 2011 at 11:16 PM

I'd like to add another contribution that would be complementary :

As explained before in this thread, I could start to develop an InputField that will allow to manage many kinds of HTML inputs in edition and have some of the attributes you just mentionned.

Dec 13, 2011 at 11:36 PM

Yes, using html5 type attribute. Let's call it input field for the moment.

Dec 13, 2011 at 11:41 PM

(beating the dead horse a bit more): I think it would be really confusing to have both text, date, etc. fields and a html5 field that can do what all those are doing. I really don't see the point, and also don't assume that people have a clue what HTML5 is.

Why don't we make sure that all our fields output clean html5 markup that degrades gracefully?

Dec 14, 2011 at 8:51 AM

I agree. Each kind of field should give the possiblity to choose an appropriate editor.

That's why I proposed in an other thread to use Modernizr and some shims to 'degrade gratefully' for browsers that don't have all HTML 5 features.

InputField should handle String :

Color ?

DateTimeField should handle DateTime 


NumericField should handle Decimal :

Range (Slider)
Spinner (+/-)

EnumerationField already has some editors (DropDown, Radio, Checkboxes,  ...) but I'd suggest to add this kind of improvement with jQuery plugin :


Each one should have client 'validation' attributes (when appropriate) :

Min / Max / Step 

And some other attributes : 


Dec 14, 2011 at 1:28 PM

I have commited a first implementation of an InputField.

Dec 16, 2011 at 9:46 AM

I'd like to add some improvements to editors thanks to jQuery :

- Toggle Buttons for radio buttons and checkboxes :

- Numeric Field could have a slider editor.

- DatePicker should have some to allow to enable some options (Date range, Dispay button bar, Month/Year selector, show weeks, multiple months, ... ) :

I've made a first test to activate these features but it seems that the jQuery theme used doesn't include some styles (css and images) for the toogle buttons or slider for example.

Just by regenerating jquery-ui-1.8.16.custom and adding some images, it works better but I think you had made some specific customizations (date picker, ...).


I think jQueryUI should be a separated module and it would be interesting to include some features :

- Globalization files (date picker, ...)

- Themes : add other jQuery themes.

- I don't know if it is better to have one css or separated css files.

- A setting to choose jQueryUI theme or a theme roller widget would also be cool)

If it makes sense, I'll add a suggestion in the Issue tracker.

Dec 16, 2011 at 7:26 PM

Sounds good. Why do you think jQueryUI should be taken out of the jQuery module?

Dec 16, 2011 at 8:22 PM

On the site I'm working on now, we're only including jquery UI on the pages that need it because it's a hefty sized additional download. We want our homepage and certain landing pages to load very fast. Maybe that's why  agriffard wants to separate it?


What happens if someone is using jquery ui and wants to use a different jquery ui theme on some or all pages? Is there an easy way to override that in your own site's Orchard theme? 

Dec 16, 2011 at 8:34 PM

No, that's an entirely separate issue: themes are entirely free to include it or not, as are the modules that you use. They are also free to use any jQuery theme they want. Making it a separate module would not change that at all.

Dec 16, 2011 at 9:15 PM

In fact, I don't mind if they are separated modules.

It's just that jQuery and jQueryUI have their own roadmaps and releases.


Inside jQueryUI, we could define for each plugin script (that are already defined in the Resources) the corresponding css (for the moment, that is a custom bundled css)

Dec 16, 2011 at 9:21 PM

OK, well, anything that improves the experience of using the library is fine. Let's keep a single jQuery module, but make it better. Cool stuff.

Dec 16, 2011 at 11:06 PM

I don't see the problem having both in the same module; Orchard only loads specific parts of the library that are requested by any views that are rendered.

What could be added to the jQuery module, however, is jQuery Mobile - which I noticed is a major addition to MVC 4 developer preview.

Dec 16, 2011 at 11:11 PM

Yes, jQuery mobile would be sweet.

Dec 16, 2011 at 11:23 PM

For 1.5+ it might be nice to consider full mobile support rolled into each theme. Looking at how MVC4 handles it, they actually have a system a bit like User Agent Rules + Alternates. So you can define various predicates that will enable alternate versions of templates, e.g. when a mobile user agent is seen. Of course, we can do this already in Orchard for the most part, using shape table events (just wouldn't work for MVC views).

Dec 16, 2011 at 11:34 PM

1.5 might be the right time to revise theme machine or maybe a new default theme with that sort of consideration, yes.

Dec 21, 2011 at 7:42 PM

Any idea why in the admin features page the Fields module is telling me "Missing: Orchard.JQuery"? Orchard is sync'd to the latest 1.x and Orchard.Fields is sync'd to the latest Dev and I've done nothing to either besides creating theme views.

I'll try rolling back to see if it was triggered by my latest sync or what.

Dec 21, 2011 at 7:55 PM
Edited Dec 21, 2011 at 7:56 PM

change Orchard.JQuery  to Orchard.jQuery in module.txt

Dec 21, 2011 at 8:21 PM

muchos garcias ;)