我有表格,我必须编辑此信息。我可以获取除描述之外的所有要编辑的字段。为什么textarea不接受动态数组值?这是我的问题。请帮我解决这个问题。在此先感谢!!。
<form id="commentForm" name="commentForm" action="index.php?mdf=addbiography" method="POST" enctype="multipart/form-data" >
{if $admindetails[0].name neq ''}
<input type="hidden" id="action" name="action" value="saveupdate">
<input type="hidden" id="upid" name="upid" value="{$admindetails[0].id}">
{else}
<input type="hidden" id="action" name="action" value="add_biography">
{/if}
<article class="module width_full">
<header><h3 style="color: white;"> Add Biography</h3></header>
<div class="module_content">
<fieldset>
<div><label>Name<span class="star">*</span></label>
<input type="text" id="cname" name="name" class="required" value="{$admindetails[0].name}"></div></br></br></br>
<label>Description:<span class="star">*</span></label>
<textarea cols="60" rows="5" type="text" class="required" name="description" id="description" value="{$admindetails[0].description}"></textarea></br></br></br><br><br><br><br>
<div><label>Type<span class="star">*</span></label>
<select name="type" id="type" >
<option value="personal">Personal</option>
<option value="professional">Professional</option>
</select>
</div></br>
<div><label>Image<span class="star">*</span></label>
{if $admindetails[0].image eq ''}
<input type="file" name="file" id="file" style="margin-left:10px;" accept="image/*" class="required" value="">
{else}
<input type="file" name="file" id="file" style="margin-left:10px;" accept="image/*" value="">
{/if}
</div></br>
<img src="upload/{$admindetails[0].image}" width="300" height="300" alt="">
</fieldset>
<div class="clear"></div>
</div>
<footer>
<div class="submit_link">
<input type="submit" value="Save">
<input type="reset" value="Reset">
</div>
</footer>
</article><!-- end of stats article -->
</form>
答案 0 :(得分:0)
你试过这个吗?
<textarea cols="60" rows="5" type="text" class="required" name="description" id="description" >{$admindetails[0].description}</textarea>