I’m using 1.6.0 version EE. After I entered data through stand-alone entry form, data isn’t populated when I try to edit stand-alone form. “segment_3” is part of weblog name and “segment_4” is entry_id.
{exp:weblog:entry_form weblog="{current_weblog}" return="{segment_1}/list/{segment_3}" preview="{segment_1}/edit/{segment_3}"
show_fields="{form_fields}" use_live_url="no"
disable="category_fields|member_data|pagination|trackbacks"}
{exp:weblog:entries weblog="{current_weblog}" rdf="off" limit="1" entry_id="{segment_4}" status="Under Review|Approved|Disapproved|Open|Closed"}
<div><input type="hidden" name="entry_id" value="{segment_4}"></div>
<table border='0' cellspacing='0' cellpadding='0' style='width:97%;' >
<tr>
<td valign="middle"><h2>Edit {exp:php_text_format type="ucwords"}{segment_3}{/exp:php_text_format}</h2>
</td>
<td style="width:350px;" valign="top">
<div class='submitBox' >
<input name='preview' type='submit' class='submit' value='Preview' />
<input name='submit' type='submit' class='submit' value='Update' />
<input name="cancel" type='submit' value="Cancel" onClick="cancelEntry('entry_id{segment_4}');" />
</div>
</td>
</tr>
</table>
<table border='0' cellpadding='0' cellspacing='0' style='width:97%;margin-bottom:3px;' class="tableborder">
<tr><td>
<div id="content">
{preview}
{display_custom_fields}
{/preview}
<table border='0' cellpadding='0' cellspacing='0' style='width:100%'>
<tr>
<td>
<div class="hidden">
<input type="hidden" name="title" id="title" value="{segment_3}" />
<input type="hidden" name="entry_date" value="{entry_date format='%Y-%m-%d %g:%i %A'}" maxlength="100" style="width:100%;" />
</div>
{formatting_buttons}
<?php
switch ({segment_3})
{
case "article":
case "portal": ?>
<p>
<?php
break;
} ?>
</td>
</tr>
<tr>
<td class="publishRows">
{category_menu}
<b>Program</b>
<select name="category[]" size="1">
<?php
if ($SESS->cache['custom_profile']['role']!=="Copy Driver") { ?>
{exp:form_helper:categories entry_id="{segment_4}" parent_id="0"}
<option value="{cat_id}" {selected}>{cat_name}</option>
{/exp:form_helper:categories}
<?php
} else {
if ($SESS->cache['custom_profile']['program']==="Aquatics")
echo "<option value='18'>".$SESS->cache['custom_profile']['program']."</option>";
elseif ($SESS->cache['custom_profile']['program']==="Group Fitness")
echo "<option value='15'>".$SESS->cache['custom_profile']['program']."</option>";
elseif ($SESS->cache['custom_profile']['program']==="General")
echo "<option value='22'>".$SESS->cache['custom_profile']['program']."</option>";
elseif ($SESS->cache['custom_profile']['program']==="Massage")
echo "<option value='19'>".$SESS->cache['custom_profile']['program']."</option>";
elseif ($SESS->cache['custom_profile']['program']==="Membership")
echo "<option value='21'>".$SESS->cache['custom_profile']['program']."</option>";
elseif ($SESS->cache['custom_profile']['program']==="Outdoor Programs")
echo "<option value='14'>".$SESS->cache['custom_profile']['program']."</option>";
elseif ($SESS->cache['custom_profile']['program']==="Personal Traning")
echo "<option value='20'>".$SESS->cache['custom_profile']['program']."</option>";
elseif ($SESS->cache['custom_profile']['program']==="Rec Sports")
echo "<option value='16'>".$SESS->cache['custom_profile']['program']."</option>";
elseif ($SESS->cache['custom_profile']['program']==="Youth & Family")
echo "<option value='17'>".$SESS->cache['custom_profile']['program']."</option>";
}
?>
</select>
{/category_menu}
</td>
</tr>
{custom_fields}
<tr>
<td class="publishRows">
{if required}<b>* </b>{/if}
<b>{field_label}</b>
{if textarea}
{field_instructions}<br />
<textarea id="{field_name}" name="{field_name}" cols="100" rows="{rows}">{field_data}</textarea>
{/if}
{if textinput}
{field_instructions}<br />
<input type="text" dir="{text_direction}" id="{field_name}" name="{field_name}" value="{field_data}" maxlength="{maxlength}" size="100" onclick="setFieldName(this.name)" />
{/if}
{if pulldown}
{field_instructions}<br />
<select id="{field_name}" name="{field_name}">
{options}<option value="{option_value}"{selected}>{option_name}</option>{/options}
</select>
{/if}
{if date}
{field_instructions}<br />
<input type="text" id="{field_name}" name="{field_name}" value="{field_data}" maxlength="{maxlength}" size="100" onclick="setFieldName(this.name)" />
{/if}
</td>
{/custom_fields}
</tr>
<tr>
<td valign="top">
<p>
Status
{status_menu}
<select name="status">
<?php
if ($SESS->cache['custom_profile']['role']!=="Copy Driver") { ?>
{select_options}
<?php
} else { ?>
<?php
}
?>
</select>
{/status_menu}
</p>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<div class='submitBox' >
<input name='preview' type='submit' class='submit' value='Preview' />
<input name='submit' type='submit' class='submit' value='Update' />
</div>
</td>
</tr>
</table>
{/exp:weblog:entries}
{/exp:weblog:entry_form}
Why the fields are populated?
