Every so often I run up against an issue that's right there in the docs, but somehow has passed me by. This week that issue was Sitecore's new V9 forms implementation, and it's relationship with languages...
Edited to add: Sitecore seem to have managed to push out a fix for this in the time between me starting to write this and publishing it... If you deploy v9.0 Update 2 this should be resolved, according to the release notes. But I'll post this anyway because not everyone will upgrade right away...
If you're working in a situation where your default content language isn't
en, and you try to create a new Sitecore form, you may get a bit confused. I was creating forms on a site where
was the default:
And it was set in the
I could happily create a new form via the shiny new form editor, and save it:
And the form would appear in the content tree:
But when you come back to the "choose a form to edit" view in the designer:
Where's it gone? Cue some head-scratching...
Now there are a few blog posts about that discuss the issue of forms not being visible when you try to return to them. But these weren't an issue in my specific case.
So digging a bit I noticed that even with the default language being
for the site, the ajax requests that are being made to populate the "pick your form" UI are:
What's special about those? Well they all include the clause:
and we know (thanks to our default language) that our form items don't have a version in that language:
So, what happens if we just add a version in the
language? Well pretty much instantly, we can see:
Now it's only the root item of the form which needs updating to make the form visible:
If you actually want to have proper language variations of the form itself, you can use the form editing UI to decide which language you want to edit:
You don't need to manually create any of the other versions via Content Editor. But of course you need the form to be visible in the Forms editor in the first place to make that work...
Now, this issue is mentioned in Sitecore's documentation for the forms editor:
But if your default language is something other than
it's easier said than done to follow the instruction to "first save the form in the default language" – so until we get an update that fixes the choice of language for the UI's search queries, you may have to keep adding the
version of your form items manually...