需要将.html smarty模板转换为普通的html模板。我不知道该如何处理。请提供任何想法,最好的方法进行更改。
我尝试使用jquery来读取模板,但没有得到我期望的结果。
下面是我的代码模板。 例如:
<table id = "constitutional_div">
<tr>
<td class="response_prompt">{xl t="Weight Change"}:</td>
<td class="response">{html_radios name="weight_change" options=$form->get_options() selected=$form->get_weight_change() separator=""}</td>
<td class="response_prompt">{xl t="Weakness"}:</td>
<td class="response">{html_radios name="weakness" options=$form->get_options() selected=$form->get_weakness() separator=""}</td>
<td class="response_prompt">{xl t="Fatigue"}:</td>
<td class="response">{html_radios name="fatigue" options=$form->get_options() selected=$form->get_fatigue() separator=""}</td>
</tr>
<tr>
<td class="response_prompt">{xl t="Anorexia"}:</td>
<td class="response">{html_radios name="anorexia" options=$form->get_options() selected=$form->get_anorexia() separator=""}</td>
<td class="response_prompt">{xl t="Fever"}:</td>
<td class="response">{html_radios name="fever" options=$form->get_options() selected=$form->get_fever() separator=""}</td>
<td class="response_prompt">{xl t="Chills"}:</td>
<td class="response">{html_radios name="chills" options=$form->get_options() selected=$form->get_chills() separator=""}</td>
</tr>
<tr>
<td class="response_prompt">{xl t="Night Sweats"}:</td>
<td class="response">{html_radios name="night_sweats" options=$form->get_options() selected=$form->get_night_sweats() separator=""}</td>
<td class="response_prompt">{xl t="Insomnia"}:</td>
<td class="response">{html_radios name="insomnia" options=$form->get_options() selected=$form->get_insomnia() separator=""}</td>
<td class="response_prompt">{xl t="Irritability"}:</td>
<td class="response">{html_radios name="irritability" options=$form->get_options() selected=$form->get_irritability() separator=""}</td>
</tr>
<tr>
<td class="response_prompt">{xl t="Heat or Cold"}:</td>
<td class="response">{html_radios name="heat_or_cold" options=$form->get_options() selected=$form->get_heat_or_cold() separator=""}</td>
<td class="response_prompt">{xl t="Intolerance"}:</td>
<td class="response">{html_radios name="intolerance" options=$form->get_options() selected=$form->get_intolerance() separator=""}</td>
<td class="response_prompt">{xl t="Change in Appetite"}:</td>
<td class="response">{html_radios name="change_in_appetite" options=$form->get_options() selected=$form->get_change_in_appetite() separator=""}</td>
</tr>
<tr><td colspan="6"><label class="response_prompt"> Other </label><input type="text" name ="constitutional_text" value="{$form->get_constitutional_text()|escape:'htmlall'}" size="50"/></td></tr>
</table>
预期结果:我想获得带有类作为响应的单选按钮的名称,即:。假设:对于第一个td,我想读为weight_change名称。所有td的名称都类似。