我有一个聪明的变量,我想像这样在输入值中输出
<input type="text" id="video_id" name="product_data[video_id]" value="{$product_video_id}" />
但是它没有显示价值?如果我将变量移到它显示的输入之外?
我还应该做些什么来让它发挥作用?
谢谢
完整来源:
{assign var=product_video_service value=$product_data.product_id|fn_get_product_video_service}
{assign var=product_video_id value=$product_data.product_id|fn_get_product_video_id}
<h2 class="subheader">{$lang.media}</h2>
<div class="form-field">
<label for="video_service">{$lang.video_service}:</label>
<select id="video_service" name="product_data[video_service]">
<option {if $product_video_service == 'video_service_youtube'}selected="selected"{/if} value="video_service_youtube">YouTube</option>
<option {if $product_video_service == 'video_service_vimeo'}selected="selected"{/if} value="video_service_vimeo">Vimeo</option>
</select>
</div>
<div class="form-field">
<label for="video_id">{$lang.video_id}:</label>
<input type="text" class="input-text-medium" value="" maxlength="32" size="20" id="video_id" name="product_data[video_id]" value="{$product_video_id}" />
<p><span class="small-note"> {$lang.video_help}</span></p>
</div>