Page 1 of 1

Allow FEU to add and edit enties in Companydirectory

Posted: Sat Dec 01, 2012 4:37 pm
by zounars
Hi all,
I follow MoltenCore tutorial http://forum.cmsmadesimple.org/viewtopi ... =4&t=60532 and I can get FEU to add company but they can not edit them.

The edit button take the feu to the "feu-company-edit" page but the form is empty.

My Company directory summary template "feu_editing_list" look like this

Code: Select all

{cms_selflink page="feu-company-edit" text="Ajouter ma fiche"}

{if isset($messages)}
<div class="CompanyDirectoryMessage">
 <ul>
   {foreach from=$messages item='one'}
     <li>{$one}</li>
   {/foreach}
 </ul>
</div>
{/if}

{if isset($errors)}
<div class="CompanyDirectoryError">
 <ul>
   {foreach from=$errors item='one'}
     <li>{$one}</li>
   {/foreach}
 </ul>
</div>
{/if}

{if isset($items)}
  {if isset($firstlink) || isset($nextlink)}
  <div>
  {if isset($firstlink)}{$firstlink}&nbsp;{$prevlink}&nbsp;&nbsp;{/if}{$pagetext} {$curpage} {$oftext} {$pagecount}
  {if isset($nextlink)}&nbsp;&nbsp;{$nextlink}&nbsp;{$lastlink}{/if}
  </div>
  {/if}

  {foreach from=$items item=entry}
  
  {if isset($userid) && $userid == $entry->owner_id}
  
  <span class="CompanyDirectoryItem">
  Name: <a href="{$entry->detail_url}">{$entry->company_name}</a><br />

  {if $entry->address ne ''}
  Address: {$entry->address}<br />
  {/if}

  {if $entry->website ne ''}
  Website: <a href="http://{$entry->website}">{$entry->website}</a><br/>
  {/if}

  {* sample of addressing a custom field directly *}
  {if isset($entry->fields.foo) && $entry->fields.foo->value != ''}
    Foo: {$entry->fields.foo->value}<br/>
  {/if}

  {* sample of addressing a field with spaces or other chars in the name
  Special Field: {assign var='tmp' value='The Field Name'}{$entry->fields.$tmp->value}<br/>
  *}
  
  {* sample of addressing the value of a dropdown field: *}
  {if isset($entry->fields.mydropdown) && $entry->fields.mydropdown->dropdown_value != ''}
    Sample Dropdown: {$entry->fields.mydropdown->dropdown_value}<br/>
  {/if}

  {* sample of looping through the fields associative array *}
  {foreach from=$entry->fields key='fieldname' item='field'}
    {if isset($field->value) && $field->value != ''}
      {$field->name} ({$field->type}): {$field->value}<br/>
    {/if}
	
  {assign var="compid" value=$entry->id}   
<span class="Editcompid">{cms_selflink page="feu-company-edit" text="Edit" urlparam="&compid=$compid"}</span>
	
  {/foreach}
  </span>
  {/if}
  {/foreach}
{/if}
What did I need to get the good form?

Thanks for your help.

Arsene

System information
CMSMS 1.11.2 “Isabela”
CompanyDirectory 1.16.1
FrontEndUsers 1.21
SelfRegistration 1.7.2
I'm not using pretty url