On creating a new content item, the URL for the Content Editor passes the sys_folderid as a parameter. However, if a field entry is invalid on “Insert” (such as leaving sys_title empty), the URL no longer carries the sys_folderid parameter. Since the item has not yet been created, there is no sys_contentid either.
For one of our content types, we are using a dropdown field, populated by a lookup application, which uses the folder id to filter the dropdown list. Once the item has been created, it uses the content id instead. With neither parameter in the Validation Error URL, the dropdown list becomes empty. I cannot use a hidden field to capture the sys_folderid, because the item has not been created at that point.
Has anyone else had to deal with this issue and maybe found a way to add the sys_folderid to the Validation URL?
Actually I think you can use a Hidden field. Try adding a new hidden field to the type, and for it’s default value, click the builder button and pick “Other Value”. From the dialog, select a Type of “Single HTML Parameter” and the pick the “sys_folderid” parameter. This should cause your hidden field to always be populated with the folder id when creating a new item.
-n
[QUOTE=junwin;20877]On creating a new content item, the URL for the Content Editor passes the sys_folderid as a parameter. However, if a field entry is invalid on “Insert” (such as leaving sys_title empty), the URL no longer carries the sys_folderid parameter. Since the item has not yet been created, there is no sys_contentid either.
For one of our content types, we are using a dropdown field, populated by a lookup application, which uses the folder id to filter the dropdown list. Once the item has been created, it uses the content id instead. With neither parameter in the Validation Error URL, the dropdown list becomes empty. I cannot use a hidden field to capture the sys_folderid, because the item has not been created at that point.
Has anyone else had to deal with this issue and maybe found a way to add the sys_folderid to the Validation URL?[/QUOTE]
Thanks, Nate. You’re right, the default value does stay in the form, even if the item is not created.
How do I send that value to the lookup application?
In my dropdown field, I use the Create Choice Lookup Request window to pass the folder and content ids as Single HTML Parameters. What would I use to get the value of the hidden field?