AnsweredAssumed Answered

person object

Question asked by rjohnson on Jul 23, 2013
Latest reply on Jul 24, 2013 by zladuric
I am trying to create a edit form template whos layout differs based on the user id of the person invoking it. However, if I try and use the person object in a form, I get person is undefined. However the person object is perfectly usable in non form freemarker templates.

Form code is shown below.


<#if formUI == "true">
   <@formLib.renderFormsRuntime formId=formId />
</#if>

<div id="${args.htmlid}-dialog">
   <div id="${args.htmlid}-dialogTitle" class="hd"></div>
   <div class="bd">

      <div id="${formId}-container" class="form-container">

         <div class="yui-u first edit-metadata flat-button">
            <button id="${args.htmlid}-editMetadata" tabindex="0"></button>
         </div>
  
         <div id="${formId}-mytest" class="my-test">
            <#assign props = person.properties?keys>
         <#list props as p>
            ${p}: ${person.properties[p]}
         </#list>
         </div>
         <#if form.showCaption?exists && form.showCaption>
            <div id="${formId}-caption" class="caption"><span class="mandatory-indicator">*</span>${msg("form.required.fields")}</div>
         </#if>
     
         <form id="${formId}" method="${form.method}" accept-charset="utf-8" enctype="${form.enctype}" action="${form.submissionUrl}">
  
            <div id="${formId}-fields" class="form-fields">
               <#list form.structure as item>
                  <#if item.kind == "set">
                     <@formLib.renderSet set=item />
                  <#else>
                     <@formLib.renderField field=form.fields[item.id] />
                  </#if>
               </#list>
            </div>

            <div class="bdft">
               <input id="${formId}-submit" type="submit" value="${msg("form.button.submit.label")}" />
                <input id="${formId}-cancel" type="button" value="${msg("form.button.cancel.label")}" />
            </div>
     
         </form>

      </div>
   </div>
</div>


Can anyone tell me what I am missing?

Thanks

Bob Johnson

Outcomes