ItemCreator:Edit.Form

Version: - string  

Summary

Returns a script for the item creator form like this:

script type="text/javascript" src="/Admin/Content/JsLib/dw/ItemGroupVisibilityHandler.js"></script> <div class="item-edit-fields"> <div class="item-edit-field-group" id="General_fieldSet"> <div class="item-edit-field-group-name">General</div> <div class="item-edit-field-group-content "> <div class="item-edit-field items-clear"> <label class="item-edit-field-label">My Text Field <span class="required">*</span></label> <div class="item-edit-field-value"><input type="text" class="std item-field " name="My_Text_Field" maxlength="255" value="My default value" /> </div> </div> <div class="item-edit-field items-clear"> <label class="item-edit-field-label">My Item Field </label> <div class="item-edit-field-value"><div class="item-editor-box list-editor-box"> <ul class=""> <li class="item-clearfix"> <input type="checkbox" id="My_Item_Field_0" name="My_Item_Field" value="MyOption1" /> <label class="item-option-label" for="My_Item_Field_0">My Option 1</label> </li> <li class="item-clearfix"> <input type="checkbox" id="My_Item_Field_1" name="My_Item_Field" value="MyOption2" /> <label class="item-option-label" for="My_Item_Field_1">My Option 2</label> </li> </div> </div> </div> </div> </div> </div> <script type="text/javascript"> Dynamicweb.Items.GroupVisibilityRule.get_current().add({"VisibilityRules":[],"Groups":[{"GroupName":"General","IsVisible":true}],"Fields":[{"Id":"My_Text_Field","Group":"General"},{"Id":"My_Item_Field","Group":"General"}]}); </script>

Settings

The value is generated automatically.

Examples

Outputting the template tag

@GetString("ItemCreator:Edit.Form")

Check if tag has a value

@if(!string.IsNullOrWhiteSpace(GetString("ItemCreator:Edit.Form"))) { @* Tag has value, so let's do something useful here. *@ }

Assign tag to a value for later use

@{ string storedTag = GetString("ItemCreator:Edit.Form"); }

Outputting the template tag

<!--@ItemCreator:Edit.Form-->

Check if string has a value

<!--@If Defined(@ItemCreator:Edit.Form)--> Let's output this tag here: <strong><!--@ItemCreator:Edit.Form--></strong> <!--@EndIf(@ItemCreator:Edit.Form)-->